cheald has an excellent comment regarding MessagePack, JSON, and Protocol Buffers in the post from 15 hours ago: http://news.ycombinator.com/item?id=4091051 MessagePack is not smaller than gzip'd JSON MessagePack is not faster than JSON when a browser is involved Other comments from that post include: MessagePack is not human readable MessagePack has issues with UTF-8 Small packets also have significant TCP/IP overhe…
Although the original blog post focuses on JavaScript and browsers, MessagePack itself doesn't mainly focus on them. A major use case of MessagePack is to store serialized objects in memcached. A blog post written by Pinterest describes this use case ( http://engineering.pinterest.com/posts/2012/memcache-games/ ). They use MessagePack with Python which is faster than one with JavaScript. They could store more objects…
The performance declination argument is bullshit. Network's a million [0] times slower than gzip.
Truth be told, once you're on the network, you're already screwed w.r.t. most serialization. The only thing efficient compression/decompression is going to buy you is lower CPU (memcached servers run at like 2% CPU util, even under heavy load [1]).
Memcache at Facebook actually uses the ascii protocol, and the memcached implementation is a braindead strtok parser (some of our other stuff uses ragel -- you'll have a hell of a time out optimizing ragel with the right compiler flags -- I've tried and failed).
Just use whichever serialization format has the best API, because I can say with near certainty that it's not going to be a perf problem for you if you're touching disk, network, etc.
[0] Obviously a made up number, but it's way slower. Especially if you're unlucky and lose a packet or something.
[1] With the exception of weird kernel spin lock contention issues, which can happen if you're not sharding your UDP packets well and trying to reply from 8+ cores on 1 UDP socket. You probably aren't.