Iris Classon
Iris Classon - In Love with Code

Stupid Question 106: What is MessagePack?

[To celebrate my first year of programming I will ask a ‘stupid’ questions daily on my blog for a year, to make sure I learn at least 365 new things during my second year as a developer]

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:

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#


Leave a comment (via email)
Robert MacLean
12/18/2012 2:11:06 AM
What would help your articles is links - especially the main topic item so people can easily follow the bread crumbs from your knowledge to the actual bits. 
Iris Classon
12/18/2012 2:29:29 AM
Reply to: Robert MacLean
That is very good advice, not sure how to implement this with the questions as they are rather random... any idea? 
12/18/2012 8:34:51 AM
Reply to: Iris Classon
Perhaps a link to the MessagePack site likes this: 
Iris Classon
12/18/2012 8:50:54 AM
Reply to: Robert MacLean
I was so sure I had added a link, sorry about that! I also think I misunderstood your first comment :P I thought you meant to organize the questions under pages :) 

Last modified on 2012-12-16