4 ms·
The ex-googler who compares Protocol Buffers to MessagePack is either lying about his understanding of Protocol Buffers, or hasn't looked at MessagePack beyond
by carbonica 15y ago
The ex-googler who compares Protocol Buffers to MessagePack is either lying about his understanding of Protocol Buffers, or hasn't looked at MessagePack beyond a simple glance.
First of all, MessagePack throws up a benchmark on their front page bragging about how it can deserialize 3 integers and a string faster than Protocol Buffers. Lovely. Of course, besides being a silly microbenchmark, that's in an array - not a keyed map, and since your protocol is going to evolve, you'll need a keyed map. Since MessagePack serializes map keys with the message, you're going to take a big hit there. Let alone when you have a protocol that grows over several years and has to support a service with over a hundred keys. Eventually, your string keys will become too big of an overhead, and you'll switch to integer keys. Then you have to roll your own translation layer between your space-saving integer keys and useful names for your keys. It's roughly at this point you wish you had picked the "creaky" solution which has done the right thing™ for almost a decade (though of course not open source for that long).