Member-only story
Understanding Protocol Buffers
A deep dive into Protobufs

In the previous article, we went through various concepts related to the gRPC framework. There I had briefly mentioned protocol buffers, which is the default method of serializing structured data in gRPC. In this article, we’ll be taking a deeper look into the concept of protocol buffers.
What Are Protocol Buffers?
Protocol buffers are a method of serializing data that can be transmitted over wire or be stored in files. The other formats like JSON and XML are also used for serializing data. Although these platforms have proved themselves to be extremely flexible and effective, one place where they aren’t fully optimized is scenarios where the data is to be transmitted between multiple microservices in a platform-neutral way.
This was the challenge that made Google create the ProtoBuf format in 2008. Since then, it’s widely been used internally at Google and has been the default data format for the gRPC framework. Initially, the Protobuf was created for three primary languages — C++, Java, and Python. Over the course of years, many languages like Go, Ruby, JS, PHP, C#, and Objective-C have also started supporting Protobufs. The current version of Protobuf is called proto3.