Earlier quoted context omitted.
That mostly speaks to the quality of node's MessagePack implementation, nothing more. Benchmarking data format serialization is hard, because one poor implementation throws things off.
MessagePack in Node isn't much more than bindings to the C++ library ( https://github.com/pgriess/node-msgpack/blob/master/src/msgp... ). For me the bottom line was "What's faster in Node, for my project, right now?", and the answer was JSON. There are benefits to MessagePack that have already been mentioned here, namely not having to base64 binary data first (smaller size), but that's true for any binary message for…
You're Using JSON, Why not MessagePack?
61–66 of 66 posts
Re: You're Using JSON, Why not MessagePack?
#62There's also TNetStrings which mongrel2 is using now. ( http://tnetstrings.org/ )
Re: You're Using JSON, Why not MessagePack?
#63* fucking use JSON * if needed: use snappy for blob storage (ie for key value stores) * if you have an need for very high perfomance in your application that is mature to some degree, evaluate some binary protocols or compression and see how they perform. the bad thing is that i already see full stack frameworks popping up "now with " and everybody will scream "YEAH!". Most YEAH!-sayers will seriously be butt-hurt by…
As far as JSON being human readable, most JSON sent over the wire has no whitespace and generally needs to be run through a parser if you're going to read any significant amount if it.
You even say in your third point that if you need high performance you'd look at a binary protocol, this is one such protocol. Also, you completely ignore the space savings mentioned.
Your name is green, you're new to HN, and frankly comments like this drive away the kind of users we want here, so learn to talk to your peers respectfully, or keep your mouth shut.
Re: You're Using JSON, Why not MessagePack?
#64* fucking use JSON * if needed: use snappy for blob storage (ie for key value stores) * if you have an need for very high perfomance in your application that is mature to some degree, evaluate some binary protocols or compression and see how they perform. the bad thing is that i already see full stack frameworks popping up "now with " and everybody will scream "YEAH!". Most YEAH!-sayers will seriously be butt-hurt by…
Your tone in really just not constructive and also not appreciated. As far as JSON being human readable, most JSON sent over the wire has no whitespace and generally needs to be run through a parser if you're going to read any significant amount if it. You even say in your third point that if you need high performance you'd look at a binary protocol, this is one such protocol. Also, you completely ignore the space sa…
Re: You're Using JSON, Why not MessagePack?
#65There's also TNetStrings which mongrel2 is using now. ( http://tnetstrings.org/ )
Which is itself really just a flawed reimplementation of bencode. (Bencode can be parsed without lookahead; tagged netstrings cannot.) http://wiki.theory.org/BitTorrentSpecification#bencoding
Re: You're Using JSON, Why not MessagePack?
#66Honestly I'm not sure why you wouldn't just simply use gzipped/JSON. My test show nearly no difference (1-2%) in performance with MessagePack, yet you get to leverage all kinds of things that already understand JSON.