• On BNET: 24 killer apps for a flash drive
July 8, 2008 6:38 AM PDT

Google open-sources XML-alternative Protocol Buffers

XML, it seems, has run out of steam for Google.

Google said Monday that it has created an open-source project for a data interchange format called Protocol Buffers.

The software is meant to solve the problem of sharing information in a wide range of formats between servers at high speed. It's also designed to let companies like Google upgrade software on a network of connected servers without causing hiccups.

Google thought of using XML as a lingua franca to send messages between its different servers. But XML can be complicated to work with and, more significantly, creates large files that can slow application performance.

Protocol Buffers is an alternative way of describing the format of data that is being sent over the network or stored to a hard drive. Unlike XML, it's a compact format and is designed to be simple to use, according to Kenton Varda of Google's Software Engineering Team.

Varda wrote in the company's open-source blog:

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.

Matt Cutts, a software engineer who heads Google's Webspam team, said in a blog late Monday that Protocol Buffers automatically generates Java, Python, or C++ code:

Think of Protocol Buffers as a very compact way of encoding data in a binary format. A programmer can write a simple description of a protocol or structured data and Google's code will autogenerate a class in C++, Java, or Python to read, write, and parse the protocol. Given a protocol buffer, you can write it to disk, send it over the network wire, and do any number of interesting tricks. Any medium-sized company (and quite a few startups!) should find Protocol Buffers very handy.

The software is available the Apache Software License 2.0.

Like a lot of what Google's engineering team does, this seems to make sense. XML has long been criticized as being too slow, which has led to controversial efforts to standardize XML compression.

But given the huge investment in XML, it doesn't look like Protocol Buffers will replace it. Instead, it will be used--certainly by Google and likely others--for Web applications that need a very efficient way to move around data in multiple formats.

Martin LaMonica is a senior writer for CNET's Green Tech blog. He started at CNET News in 2002, covering IT and Web development. Before that, he was executive editor at IT publication InfoWorld. E-mail Martin.
Recent posts from News Blog
Navy charters kite-powered cargo ship to deliver equipment
EA Mobile, Eidos Interactive sign agreement
Sprint first to offer HTC Touch Pro
Flipping out: RIM BlackBerry Pearl Flip 8220 debuts
Sprint HTC Touch Diamond outed early
Add a Comment (Log in or register) 1 comment
by manodud July 8, 2008 9:29 AM PDT
A super-techie in my team just demonstrated that although proto-buf binary format could be 11% smaller than JSON text data encoded as UTF-8, JSON is almost 3 times as fast as protocol buffer...
Reply to this comment
Powered by Jive Software
advertisement
Resource center from News.com sponsors
You Need The Speed of Norton 2009
Introducing Norton Internet Security™2009

Click Here!
With one-click, one-minute install, under 8MB of memory usage and fewer, shorter scans, it's the fastest security suite anywhere. Norton. Smart Security, Engineered for Speed. Get a FREE trial today!

Click Here!
The Fastest Security Suite Anywhere

Experience the revolutionary Norton Internet Security™ 2009. With Norton™ Insight, a new feature, you get precision security that targets only at risk files for fewer, faster, shorter scans

Win a Trip to Space!*

Enter the Blast Off with Norton Sweepstakes for your shot at a trip to space. You could experience being fast and weightless, just like the new Norton 2009. *No purchase necessary; click for full details.

FREE Trial!

Act now to get your FREE trial of Norton Internet Security 2009. Try it for the protection. Love it for the speed

Norton Safe Web NEW!

A community-based system that rates web site safety

Norton Labs NEW!

Users can download new security technologies and share input directly with developers. Help us shape our future products!

About News Blog

Recent posts on technology, trends, and more.

Add this feed to your online news reader

News Blog topics

Featured blogs

advertisement
advertisement

Inside CNET News

Scroll Left Scroll Right