SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
Protocol Buffer & gRPC
Data Serialization
Data serialization is the process of converting structured data to a format that allows
sharing or storing of data in a from that allow recovery of its original structure. De-
serialization is the exact opposite.
Serialization formats
• XML
• JSON
• CSV
• YML
• Protobuf etc.
Protocol buffers
• Protocol buffers are a flexible, efficient, automated mechanism for serializing structured
data and its
• Language-neutral
• Platform-neutral
• Extensible
JSON
• Advantages
• Data can take any forms (arrays, nested elements)
• Is a widely accepted format in web
• Can ne read by pretty much any language
• Can be easily shared over a network
• Disadvantages
• Data has no schema enforcing
• Json Objects can be quite big in size because of repeated keys
• No comments, metadata
protobuff
• Advantages
• Data is fully typed
• Data is compressed automatically (less CPU usage)
• Schema is needed to generate code and read the data
• Documentation can be embedded in the schema
• Data can be read across any language(Java, C#, Go, Python, JS etc..)
• Schema can be evolved over the time, in a safe manner
• 3-10x smaller, 20-100x faster then XML
• Code is generated for you automatically
• Disadvantages:
• Support for some language might be lacking
• Can’t open the serialized data with the text editor
Structure message Person {
string first_name = 1;
string last_name = 2;
int32 age = 3;
}
HTTP 1.1 vs HTTP/2
gRPC
• Developed by Google, under the name Stubby.
• In 2015 Google liberalized it as open source and named it gRPC.
• Adopted by large companies in the very first year like Netflix, Cisco, Docker etc.
• Became part of Cloud Native Computing Foundation in 2017.
Core features that make it awesome
• Idiomatic client libraries in 11 languages
• Highly efficient on wire and with a simple service definition framework
• Bi-directional streaming with http/2 based transport
• Pluggable auth, tracing, load balancing and health checking
Protobuff and gRPC
gRPC Interaction
• Unary: when the client sends a single request and receives a single response.
• Server-streaming: when the server responds with a stream of messages to a client's request.
Once all the data is sent, the server additionally delivers a status message to complete the
• Client-streaming: when the client sends a stream of messages and in turn receives a single
response message from the server.
• Bidirectional-streaming: the two streams (client and server) are independent, meaning that they
both can transmit messages in any order. The client is the one who initiates and ends the
Protobuff and gRPC
Protobuff and gRPC

More Related Content

PPTX
The Right Kind of API – How To Choose Appropriate API Protocols and Data Form...
PPTX
Introduction to gRPC. Advantages and Disadvantages
PPTX
Web technologies: recap on TCP-IP
PPTX
Module 5 Application and presentation Layer .pptx
PPTX
UNIT I DIS.pptx
PPTX
Data Communication and Newtworking 1 .pptx
PPTX
Data Communication and Newtworking 1 .pptx
PPTX
Hadoop introduction
The Right Kind of API – How To Choose Appropriate API Protocols and Data Form...
Introduction to gRPC. Advantages and Disadvantages
Web technologies: recap on TCP-IP
Module 5 Application and presentation Layer .pptx
UNIT I DIS.pptx
Data Communication and Newtworking 1 .pptx
Data Communication and Newtworking 1 .pptx
Hadoop introduction

Similar to Protobuff and gRPC (20)

PDF
Hadoop Ecosystem and Low Latency Streaming Architecture
PPTX
Modern Distributed Messaging and RPC
PPTX
Linux Inter Process Communication
PDF
Hpc lunch and learn
PPTX
403983283sdsadsadsadasdsda-CCNA-PPT-pptx.pptx
PDF
DISTRIBUTED SYSTEM CHAPTER THREE UP TO FIVE.pdf
PDF
Data Serialization in Python JSON vs. Pickle
PPTX
Unit 1 web technology uptu slide
PPTX
(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers
PPTX
Building a Scalable Web Crawler with Hadoop
PPTX
Common crawlpresentation
PPTX
IT-NET GROUP 3 REPORT.pptx
PPT
Application Layer
PPTX
Viloria osi layer4-7
PPTX
Building an Event Bus at Scale
PPTX
MODULE-5_CCN.pptx
PPTX
Summer 2017 undergraduate research powerpoint
PDF
Computer Networks Module 1-part 1.pdf
PDF
[Distributed System] ch4. interprocess communication
PDF
RPC in Smalltalk
Hadoop Ecosystem and Low Latency Streaming Architecture
Modern Distributed Messaging and RPC
Linux Inter Process Communication
Hpc lunch and learn
403983283sdsadsadsadasdsda-CCNA-PPT-pptx.pptx
DISTRIBUTED SYSTEM CHAPTER THREE UP TO FIVE.pdf
Data Serialization in Python JSON vs. Pickle
Unit 1 web technology uptu slide
(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers
Building a Scalable Web Crawler with Hadoop
Common crawlpresentation
IT-NET GROUP 3 REPORT.pptx
Application Layer
Viloria osi layer4-7
Building an Event Bus at Scale
MODULE-5_CCN.pptx
Summer 2017 undergraduate research powerpoint
Computer Networks Module 1-part 1.pdf
[Distributed System] ch4. interprocess communication
RPC in Smalltalk
Ad

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Getting Started with Data Integration: FME Form 101
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
Tartificialntelligence_presentation.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Mushroom cultivation and it's methods.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
A Presentation on Artificial Intelligence
PPTX
cloud_computing_Infrastucture_as_cloud_p
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
Unlocking AI with Model Context Protocol (MCP)
Getting Started with Data Integration: FME Form 101
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Tartificialntelligence_presentation.pptx
A comparative analysis of optical character recognition models for extracting...
Mushroom cultivation and it's methods.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Reach Out and Touch Someone: Haptics and Empathic Computing
NewMind AI Weekly Chronicles - August'25-Week II
Digital-Transformation-Roadmap-for-Companies.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Programs and apps: productivity, graphics, security and other tools
A Presentation on Artificial Intelligence
cloud_computing_Infrastucture_as_cloud_p
Group 1 Presentation -Planning and Decision Making .pptx
Encapsulation_ Review paper, used for researhc scholars
Spectral efficient network and resource selection model in 5G networks
A comparative study of natural language inference in Swahili using monolingua...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Ad

Protobuff and gRPC

  • 2. Data Serialization Data serialization is the process of converting structured data to a format that allows sharing or storing of data in a from that allow recovery of its original structure. De- serialization is the exact opposite. Serialization formats • XML • JSON • CSV • YML • Protobuf etc.
  • 3. Protocol buffers • Protocol buffers are a flexible, efficient, automated mechanism for serializing structured data and its • Language-neutral • Platform-neutral • Extensible
  • 4. JSON • Advantages • Data can take any forms (arrays, nested elements) • Is a widely accepted format in web • Can ne read by pretty much any language • Can be easily shared over a network • Disadvantages • Data has no schema enforcing • Json Objects can be quite big in size because of repeated keys • No comments, metadata
  • 5. protobuff • Advantages • Data is fully typed • Data is compressed automatically (less CPU usage) • Schema is needed to generate code and read the data • Documentation can be embedded in the schema • Data can be read across any language(Java, C#, Go, Python, JS etc..) • Schema can be evolved over the time, in a safe manner • 3-10x smaller, 20-100x faster then XML • Code is generated for you automatically • Disadvantages: • Support for some language might be lacking • Can’t open the serialized data with the text editor
  • 6. Structure message Person { string first_name = 1; string last_name = 2; int32 age = 3; }
  • 7. HTTP 1.1 vs HTTP/2
  • 8. gRPC • Developed by Google, under the name Stubby. • In 2015 Google liberalized it as open source and named it gRPC. • Adopted by large companies in the very first year like Netflix, Cisco, Docker etc. • Became part of Cloud Native Computing Foundation in 2017.
  • 9. Core features that make it awesome • Idiomatic client libraries in 11 languages • Highly efficient on wire and with a simple service definition framework • Bi-directional streaming with http/2 based transport • Pluggable auth, tracing, load balancing and health checking
  • 11. gRPC Interaction • Unary: when the client sends a single request and receives a single response. • Server-streaming: when the server responds with a stream of messages to a client's request. Once all the data is sent, the server additionally delivers a status message to complete the • Client-streaming: when the client sends a stream of messages and in turn receives a single response message from the server. • Bidirectional-streaming: the two streams (client and server) are independent, meaning that they both can transmit messages in any order. The client is the one who initiates and ends the