Google's first store opens MacKenzie Scott's big donation Grand Theft Auto Online ends for PS3, Xbox 360 Pink Floyd disses Zuckerberg Ant-Man 3 Amazon Prime Day's early deals

Google open-sources XML-alternative Protocol Buffers

Company releases software for encoding data in multiple formats in a single binary format for network communications or storage.

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.