Dec 162012
 
 December 16, 2012  Posted by at 8:06 pm C# & F#, Not So Stupid Questions  Add comments

[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

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#

  4 Responses to “Stupid Question 106: What is MessagePack?”

  1. 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.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

What is 8 + 13 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)