Sitemap
Javarevisited

A humble place to learn Java and Programming better.

Member-only story

What are Protocol Buffers and why they are widely used?

--

Hello everyone. In this article, we are going to look at one of the interesting topics — Protocol Buffers, which are called Protobuf in short. Protocol buffers are a method of serializing data like and and are very efficient and super fast over the network. Let us see about Protobuf in detail and go through the Java code to understand it better.

Image Source:

What is Protobuf?

To make remote procedure calls, we need a way to transform objects (payload) in memory into bytes such that they can be transmitted to the other systems as shown below. There are many names for it: , marshaling, encoding, etc

Image Source:

A lot of programming languages support these mechanisms by default and they often use . It is a human-readable format and is widely used. But JSON tends to be slower and get bigger in size when we use it with big data or when a number of microservices communicate with each other. also has forward and backward compatibility issues.

To address these issues, google introduced Protobuf in 2008. Protobuf is an Interface Definition Language that is language-neutral and…

Javarevisited
Javarevisited

Published in Javarevisited

A humble place to learn Java and Programming better.

Dineshchandgr - A Top writer in Technology
Dineshchandgr - A Top writer in Technology

Written by Dineshchandgr - A Top writer in Technology

Principal Software Engineer and Technical Lead focussed on Backend Engineering who likes to upgrade the tech skills and share knowledge to the community

Responses (2)