Stupid Question 106: What is MessagePack?
Packing with MessagePack
This is a question I had last summer, and one I got yesterday. While talking about JSON I mentioned BSON and MessagePack to a friend, and was asked what it was. A Perfect little afternoon question!
MessagePack is a data format - or as Wikipedia puts it: “a computer data interchange format” (try this definition instead: a binary-based object serialization protocol). It was originally authored by Sadayuki “Sada” Furuhashi, he did the serialization format as well as the C, C++ and Ruby implementation. Sada created this in his junior year of college, and it grew quite fast in its popularity mainly due to the compactness of the format (how cool is that!).
He went to University of Tsukaba in Japan, which you will realize very fast as you notice the huge Japanese following this brilliant young mind has. If you want to get in touch with him you can find him on twitter under @frsyuki_ha or his blog: frsyuki.wordpress.com
MessagePack is JSON compatible , exists in a variety of language implementation, should be much faster than JSON, and is very compact. The down side (as far as I know- this isn’t covering everything as I just know the basics of MessagePack) is it isn’t very readable (its optimized for the computer), the implementation and the effect on performance differs between the different language implementations, the performance claim has been challenged by a few users.
Here is a quick and dirty example of how to use MessagePack in C#:
Serializing and deserializing (packing/unpacking) to a file and/or memorystream with MessagePack in C#
Last modified on 2012-12-16