Google open sources XML alternative Protocol Buffers

By Martin LaMonica, CNET News.com
Wednesday, July 09, 2008 10:37 AM

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

Google on Monday said 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, from 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 engineering from Google's Webspam team, said 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 with 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 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.

This article was first published as a blog on CNET News.com.


WORTHWHILE?

0

0 votes
Blog

Talkback 0 comments

There are currently no comments for this post.


Tech Jobs Now!

Search for your ideal tech job:

Code concepts: Visual Studio's T4 templates

Web Development

The T4 templating system is used to programmatically generate artifacts. Here's an overview about why the templates are useful and how to work with them.


Read more »


 
Virtualize your way to cost savings
Build an infrastructure that is flexible, scalable, and economical, as you strive to become a truly agile business.

Red Hat Outlines Its Virtualization Strategy and Roadmap for 2009
» Watch the video




Where have all the bosses gone?

Blog thumbnail

I've had dreams of opening my own cafe or bistro...cum music store...cum music school. But, I soon gave up that dream when I realized it would require significant investment and..... by Eileen Yu

Read more »

Tags

  1. antivirus
  2. apple ipod
  3. cnet networks inc.
  4. desktop
  5. e - mail
  6. hard drive
  7. intuit inc.
  8. mcafee inc.
  9. microsoft corp.
  10. microsoft windows
  11. microsoft windows vista
  12. microsoft windows xp
  13. norton co.
  14. pc
  15. performance
  16. security
  17. software
  18. tool
  19. web
  20. web site