Google protocol buffers -- 10X faster than XML?

Google has released to open source one of its most widely used internal development tools -- a data interchange format called Protocol Buffers. The key part of an official blog post about Protocol Buffers is:

Protocol Buffers allow you to define simple data structures in a special definition language, then compile them to produce classes to represent those structures in the language of your choice. These classes come complete with heavily-optimized code to parse and serialize your message in an extremely compact format. Best of all, the classes are easy to use: each field has simple "get" and "set" methods, and once you're ready, serializing the whole thing to – or parsing it from – a byte array or an I/O stream just takes a single method call.OK, I know what you're thinking: "Yet another IDL?" Yes, you could call it that. But, IDLs in general have earned a reputation for being hopelessly complicated. On the other hand, one of Protocol Buffers' major design goals is simplicity. By sticking to a simple lists-and-records model that solves the majority of problems and resisting the desire to chase diminishing returns, we believe we have created something that is powerful without being bloated. And, yes, it is very fast – at least an order of magnitude faster than XML.

There's already a Protocol Buffers FAQ too.

Actually, what's being released is a rewritten Version 2 of Protocol Buffers; internally, Google mainly uses an earlier spaghetti version. However, Google says it's moving to Version 2. Google further says that Protocol Buffers is a key part of various other software that Google plans to open source going forward.

Related link

Google has thousands of internal data formats, mostly simple ones

Join the Network World communities on Facebook and LinkedIn to comment on topics that are top of mind.

Copyright © 2008 IDG Communications, Inc.

SD-WAN buyers guide: Key questions to ask vendors (and yourself)