Saturday, March 12, 2011

A standard for defining binary protocols

In 2003 I had an idea - use XML to describe binary protocols. You see, whereas XML-derived language are described by schemas (e.g. XSD), there's not such tool for binary protocols. So every binary protocol has to be documented in its own proprietary way. This lack of a common way to describe binary formats/protocols makes it hard to implement tools that know how to speak these protocols, not to mention tools that automatically convert data between them. My idea was supposed to solve that.

Anyway, today I see that the w3c have come up with a new standard: EXI. At first I was like "great, yet another standard for passing information - just what we need". But actually it's really similar to the idea I had. It's basically an XML language that describes efficient binary protocols. From I gather (skimming through the standard for 3 minutes) they do something that reminds me of Huffman encoding of the data types and end up with a very efficient binary representation, but one that is has an XML spec. I hope this becomes popular.

I have no illusions that my idea had anything to do with this standard. But I'm happy to see it wasn't such a stupid idea after all. :)