Google argues in getting xml replaced by a lower level binary IDL. Even tho I’m not really fond of Google’s goals and methods, I’m really impressed by the pertinence of this proposition… and even more impressed to see the doc and code open-sourced.
“What are protocol buffers?
Protocol buffers are a flexible, efficient, automated mechanism for serializing structured data – think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages. You can even update your data structure without breaking deployed programs that are compiled against the “old” format.”
“For example, let’s say you want to model a person with a name and an email. In XML, you need to do:
<person>
<name>John Doe</name>
<email>jdoe@example.com</email>
</person>
while the corresponding protocol buffer message definition (in protocol buffer text format) is:
person {
name = "John Doe"
email = "jdoe@example.com"
}
In binary format, this message would probably be 28 bytes long and take around 100-200 nanoseconds to parse. The XML version is at least 69 bytes (if you remove whitespace) and would take around 5,000-10,000 nanoseconds to parse.”
RSS optimization through this kind of technology could really free A LOT of bandwith and processing time up.
If data serialization and optimization matters to you, go read the article, the future might be written, who knows…
This entry was posted on Wednesday, July 9th, 2008 at 4:33 am and is filed under XML. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.