Protocol Buffers (also sometimes referred to as protobuf) is a cross-platform mechanism for serializing structured data. Its documentation compares it to formats like XML or JSON, but smaller, faster, and simpler.
“You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages,” the documentation explains.
It is ideal for ephemeral network traffic and long-term data storage, and offers benefits such as compact data storage, fast parsing, availability across many programming languages, and automatically-generated classes.
RELATED CONTENT: Last week’s open source project: OpenDAC
The project was developed internally at Google to power its services, and then open sourced in 2008. One of the reasons the company open sourced it is actually because it was trying to open source other projects which relied on it, which forced the company to also release Protocol Buffers.
“We wanted to provide public APIs that accept protocol buffers as well as XML, both because it is more efficient and because we convert that XML to protocol buffers on our end, anyway. We thought that people outside Google might find protocol buffers useful. Getting protocol buffers into a form we were happy to release was a fun side project,” the maintainers wrote in a post.
Its development began as early as 2001, though it has gone through several iterations to become what it is today. Now it is used in a variety of projects and companies, including gRPC, Google Cloud, and Envoy Proxy.
The most recent release is v27.0, which came out last week. And currently, the project has over 64K stars on GitHub and has over 1000 developers contributing to it.