[zeromq-dev] BSON as high performance serialisation
Wolfgang Richter
wolf at cs.cmu.edu
Sun Apr 1 00:52:08 CEST 2012
On Sat, Mar 31, 2012 at 6:40 PM, Steven McCoy <steven.mccoy at miru.hk> wrote:
> On 31 March 2012 17:33, Rick Olson <technoweenie at gmail.com> wrote:
>>
>> How's BSON compare to msgpack? I've started using that in places.
>
>
> Not to dissuade from MsgPack having a more convenient API to use,
> but MsgPack is surprisingly worse than Protocol Buffers. Despite their
> website claims, unfortunately the MsgPack projects testing procedure is
> flawed. This has previously been raised on the list.
Right, although this is implementation-specific.
>
> After looking at http://bsonspec.org/#/specification I'm not sure how
> YouTube is finding BSON to be faster. It looks like a 1st generation format
> like TIBCO's forms and not second generation qforms (using a dictionary), or
> third generation rforms (using dynamic dictionaries).
I agree, with string-based keys and space-inefficiency I'm wondering a bit too.
However, I think the key is in their "custom" BSON implementation.
I highly doubt YouTube uses vanilla BSON.
I think it is more likely that, just as BSON was "inspired" by JSON
(but not just a simple extension), I think YouTube is using something
"inspired" by BSON, but optimized for their use cases, and implemented
accordingly.
Note they claim "implementation which is 10-15 time faster than the
one you can download," which to me means they have a custom
_implementation_ of BSON which might differ from spec, that is faster
than the MongoDB canonical implementation.
More information about the zeromq-dev
mailing list