Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

serialization
prototype
google
datastructure
communitycreator

What is Protocol Buffers?

Non Stop Learning...

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Protocol buffers (Protobuf) is a Google project used to easily and efficiently serialize structured data so that it can be transmitted over a wire or stored in files.

Protobuf is more optimized for scenarios where the data is transmitted between multiple micro-services in a platform-neutral way. This is why developers often prefer Protobuf when serializing data.

Protobuf > JSON

Protobuf is faster than JSON and XML. This is because it removes many responsibilities usually done by data formats and focuses only on serializing and deserializing data as fast as possible.

The definition of data to be serialized is written in configuration files called proto files with the extension .proto. These files contain the configuration known as messages.

Key features

  • Binary transfer format

The data is transmitted as binary. This improves the speed of transmission more than raw string because it takes less space and bandwidth.

  • Separation of context and data

In JSON and XML, the data in context are not separable, whereas in Protobuf, it is separable.

  • Message format

As discussed before, the data is transmitted as Protobuf based on a configuration file known as messages.

RELATED TAGS

serialization
prototype
google
datastructure
communitycreator

CONTRIBUTOR

Non Stop Learning...

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring