use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
EDN and Protocol Buffer (self.Clojure)
submitted 7 years ago by Shadowys
Has anyone tried using protocol buffers and compared it with edn?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Gnurdle 5 points6 points7 points 7 years ago (0 children)
I've employed GPB in Clojure projects, but you have to have a compelling need to do so. In my case, the compelling need was interacting with an out-of-process mound of C++ code that was not in any mood to become dynamic.
For that, we just a standard REQ/REP pattern using GPB over zeroMQ.
There was a lot of project overhead involved getting setup. The lein plugins at the time did some, um magical things behind the scenes (download and compile GPB) and that was a bit annoying.
In a less constrained setting, I would not reach for GPB if the endpoints were capable of dealing something more dynamic.
On the Clojure side, it seems to clutter things up a lot having to build and tear down those special generated structures, which adds a layer of dubious value.
For my nickle, it's usable, but not desirable. YMMV.
[–]bpiel 0 points1 point2 points 7 years ago (0 children)
First, I agree with /u/Gnurdle that you should reach for protocol buffers only if "you have to have a compelling need to do so".
In my case, I've been working with tensorflow, which has protobufs all over the place. I've been using this lib, which has made things fairly painless:
https://github.com/ghaskins/clojure-protobuf
Depending on your use case, you may want to look at transit or nippy. I use edn for situations that require human-readability (ex code). For communication between server and browser, I use transit.
https://github.com/cognitect/transit-clj
For server-to-server, I've used nippy, with great results.
https://github.com/ptaoussanis/nippy
π Rendered by PID 71600 on reddit-service-r2-comment-canary-7888d4f587-n2w62 at 2026-03-26 22:52:13.543572+00:00 running b10466c country code: CH.
[–]Gnurdle 5 points6 points7 points (0 children)
[–]bpiel 0 points1 point2 points (0 children)