Wed Oct 19 2022
What Is Protobuf And Why Should You Use It?
by
Ustin Zarubin

What is protobuf?
If you’re a software engineer, you’ve likely heard of protobuf or protocol buffers — but what is it, exactly? Probobuf is a data serialization format that is efficient and easy to use. It’s ideal for applications that need to exchange data quickly and easily.
Let's start with a simple protobuf example.
Imagine having a Go struct (we’re a go shop at Streamdal) and you want to send an object to your frontend application, written in React or Javascript. Every language varies in its object implementation. A go struct is not the same thing as a javascript object. We can think of this like having two native speakers communicating without a translator. It just doesn't work.
How do we make this communication consistent?
In order to make the communication consistent, we should create a common language: a platform-neutral data format! This is where protobuf shines, let's take a closer look at protobuf and its benefits.
Don't Miss Our Latest Updates
What are protobuf’s benefits?
Protobuf was designed with event-driven systems and microservices in mind. It is much more efficient than JSON and XML, making it ideal for transferring data over the network. Protoc, protobuf’s compilation tool, supports a wide range of programming languages, making it easy to integrate into your existing system.
Generally, proto schemas are:
- language-neutral (through protoc), making it easy to support multiple languages
- easily version controlled and shared across multiple services
- human-readable syntax and the ability to define your own types for existing fields
- support partial parsing, which can be useful for network applications
- extensible; allowing new fields to be added while old fields get deprecated to avoid breaking the API contract.
- integrated into automatic build systems
Thanks to these advantages, protobuf is quickly becoming the standard for data exchange in event-driven systems and microservices.
Unsolved problems
While protobuf has a good number of benefits as mentioned above, there are still some open issues with protobuf validation. The current validation framework does a decent job of validating most data types, but there are some edge cases where it falls short.
For example, it’s not currently possible to validate that all fields in a key-value object have the correct data type.
Why We Still Think protobuf is the Future
Despite the many challenges protobuf faces, it is still widely considered to be the future of data exchange. Today protobuf remains one of the most popular data serialization formats, used by millions of developers around the world. Here are four reasons why we believe protobuf is still the future of data serialization:
- Protobuf is more efficient than other formats.
- Protobuf is highly extensible.
- Protobuf has strong backward compatibility.
- Protobuf is supported by a large ecosystem of tools and libraries.
Each of these points is important in its own right, but together they make protobuf the clear choice for data serialization. As long as efficiency, extensibility, and backward compatibility remain important, protobuf will continue to be the standard for data serialization.
Ustin Zarubin
CEO
Ustin is the co-founder and CEO of Streamdal. He is a physicist turned computer scientist that has evolved into a startup junkie. Ustin is an experienced Elixir and Go developer that is obsessed with building products that people want. Ustin is passionate about excellent UX, beautiful design and keeping things simple.
Continue Exploring

Thu Jul 27 2023
Data Protection: Challenges and Opportunities
by
Daniel Selans
Explore data protection strategies, key regulations, and the role of automation in safeguarding sensitive information in an ever-evolving digital landscape.

Wed Jul 19 2023
Data Consistency in Distributed Enterprise Applications
by
Daniel Selans
Learn about data consistency in distributed enterprise apps, why it matters, and how to maintain it using validation and real-time data monitoring.