|
I love that Google just open-sourced Protocol Buffers. 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.
You may want to read this paper about the Google cluster architecture if you haven’t already, because I’m going to remind you of two things about Google that are pretty obvious in retrospect. You can think of the Google cluster architecture as a bunch of moderately powerful personal computers connected by ethernet. That’s not quite correct, but it’s a pretty good abstraction. In that model, you have pretty good disk/RAM/computational throughput, but network communication is much more limited. That leads to the first nice thing about Protocol Buffers: they’re very compact going over-the-wire via network.
To understand the other nice thing about Protocol Buffers, bear in mind that in the Google cluster architecture, there are many different types of servers that talk to each other. Question: how do you upgrade servers when you need to pass new information between them? It’s a fool’s game to try to upgrade both servers at the same time. So you need a communication protocol that is not only backward compatible (a new server can speak the old protocol) but also forward compatible (an old server can speak the new protocol). Protocol Buffers provide that because new additions to the protocol can be ignored by the old server. That lets you upgrade different servers at different times (check out the “A bit of history” section in that overview). Protocol Buffers are especially appropriate to represent requests and replies between a client and a server.
(By the way, congrats also to the folks that worked to release this code outside of Google. Making open-source code available to the outside world is a great way to build goodwill with developers.)
There are over 10,000 .proto files in use at Google, and Protocol Buffers are a vital part of Google. If you’re a programmer, why not try Protocol Buffers out for yourself?
|