1.1 Overview
Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data -- think XML, but smaller, faster, and simpler. You define how you want your data to be structured once. This takes the form of a template that describes the data structure. You use this template to encode your data structure into wire-streams that may be sent-to or read-from your peers. The underlying wire stream is platform independent, lossless, and may be used to interwork with a variety of languages and systems regardless of word size or endianness. Techniques exist to safely extend your data structure without breaking deployed programs that are compiled against the "old" format.
The idea behind Google's Protocol Buffers is that you define your
structured messages using a domain-specific language. This takes the
form of a .proto
source file. You pass this file through a
Google provided tool that generates source code for a target language,
creating an interpreter that can encode/decode your structured data. You
then compile and build this interpreter into your application program.
Depending on the platform, the underlying runtime support is provided by
a Google supplied library that is also bound into your program.