[zeromq-dev] BSON as high performance serialisation

Lourens Naudé lourens at methodmissing.com
Sun Apr 1 00:51:44 CEST 2012


I think it's more difficult to draw comparisons when one factors in the
binding ecosystem as well - a large part of the community use libzmq
through some higher level binding. Most serialization wrappers tend to
create additional heap cruft that stresses the GC in some languages. Here's
an interesting case study :

* Deets :
http://www.ohler.com/software/thoughts/Blog/Entries/2012/3/13_Need_for_Speed.html
* Implementation : https://github.com/ohler55/oj

So in summary, watch out for edges where micro benches of an implementation
is fast, yet introduce a "hidden" cost in GC pressure relative to message
volume which can destroy any soft realtime guarantees and overall system
throughput / performance.

I also think the topic should perhaps be taken off the list since libzmq
does not impose message structure, BUT it's also important to keep tabs on
this ( recommendations or real production feedback etc. ) somewhere on the
wiki or docs for reference.

- Lourens

On Sat, Mar 31, 2012 at 11:27 PM, Wolfgang Richter <wolf at cs.cmu.edu> wrote:

> On Sat, Mar 31, 2012 at 5:33 PM, Rick Olson <technoweenie at gmail.com>
> wrote:
> > How's BSON compare to msgpack?  I've started using that in places.
>
> In my mind, it seems like the performance of BSON and msgpack could be
> comparable.
>
> msgpack's specification is more generic than BSON's (no
> MongoDB-specifics), and it seems to be a bit more well specified.  In
> addition, msgpack doesn't require a string 'key' per message, and it's
> format seems to be more compact (space-efficient) than BSON.  This
> might imply quicker encoding/decoding, although that could also be
> implementation-specific.
>
> msgpack looks really nice :-)
>
> Both seem simple enough to implement on your own (no external
> dependencies introduced which can be nice).
>
> However, msgpack seems nice because an ecosystem of software including
> RPC is built around it (although reinventing the communication layers
> which could be managed by 0MQ...).
>
> BSON's canonical implementation is the one included in MongoDB.
>
> I'd expect things like msgpack to "win" in the long run (unless the
> BSON spec is changed to be simpler+more generic; it's already simpler
> than msgpack though) because they are more generic.
>
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120331/ac786746/attachment.htm>


More information about the zeromq-dev mailing list