SlideShare a Scribd company logo
1 of 13
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
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

Similar to Protobuff and gRPC

Data Serialization in Python JSON vs. Pickle
Data Serialization in Python JSON vs. PickleData Serialization in Python JSON vs. Pickle
Data Serialization in Python JSON vs. PickleInexture Solutions
 
Unit 1 web technology uptu slide
Unit 1 web technology uptu slideUnit 1 web technology uptu slide
Unit 1 web technology uptu slideAbhishek Kesharwani
 
(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers
(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers
(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for DevelopersBIOVIA
 
Building a Scalable Web Crawler with Hadoop
Building a Scalable Web Crawler with HadoopBuilding a Scalable Web Crawler with Hadoop
Building a Scalable Web Crawler with HadoopHadoop User Group
 
IT-NET GROUP 3 REPORT.pptx
IT-NET GROUP 3 REPORT.pptxIT-NET GROUP 3 REPORT.pptx
IT-NET GROUP 3 REPORT.pptxEdJulleza
 
Building an Event Bus at Scale
Building an Event Bus at ScaleBuilding an Event Bus at Scale
Building an Event Bus at Scalejimriecken
 
Summer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpointSummer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpointChristopher Dubois
 
Computer Networks Module 1-part 1.pdf
Computer Networks Module 1-part 1.pdfComputer Networks Module 1-part 1.pdf
Computer Networks Module 1-part 1.pdfShanthalaKV
 
[Distributed System] ch4. interprocess communication
[Distributed System] ch4. interprocess communication[Distributed System] ch4. interprocess communication
[Distributed System] ch4. interprocess communicationGyuhyeon Nam
 
RPC in Smalltalk
 RPC in Smalltalk RPC in Smalltalk
RPC in SmalltalkESUG
 
3 f6 9_distributed_systems
3 f6 9_distributed_systems3 f6 9_distributed_systems
3 f6 9_distributed_systemsop205
 
Networkprotocolstructurescope 130719081246-phpapp01
Networkprotocolstructurescope 130719081246-phpapp01Networkprotocolstructurescope 130719081246-phpapp01
Networkprotocolstructurescope 130719081246-phpapp01Gaurav Goyal
 
Network protocol structure scope
Network protocol structure scopeNetwork protocol structure scope
Network protocol structure scopeSanat Maharjan
 

Similar to Protobuff and gRPC (20)

Data Serialization in Python JSON vs. Pickle
Data Serialization in Python JSON vs. PickleData Serialization in Python JSON vs. Pickle
Data Serialization in Python JSON vs. Pickle
 
Unit 1 web technology uptu slide
Unit 1 web technology uptu slideUnit 1 web technology uptu slide
Unit 1 web technology uptu slide
 
(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers
(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers
(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers
 
Common crawlpresentation
Common crawlpresentationCommon crawlpresentation
Common crawlpresentation
 
Building a Scalable Web Crawler with Hadoop
Building a Scalable Web Crawler with HadoopBuilding a Scalable Web Crawler with Hadoop
Building a Scalable Web Crawler with Hadoop
 
IT-NET GROUP 3 REPORT.pptx
IT-NET GROUP 3 REPORT.pptxIT-NET GROUP 3 REPORT.pptx
IT-NET GROUP 3 REPORT.pptx
 
Application Layer
Application LayerApplication Layer
Application Layer
 
Viloria osi layer4-7
Viloria osi layer4-7Viloria osi layer4-7
Viloria osi layer4-7
 
Building an Event Bus at Scale
Building an Event Bus at ScaleBuilding an Event Bus at Scale
Building an Event Bus at Scale
 
MODULE-5_CCN.pptx
MODULE-5_CCN.pptxMODULE-5_CCN.pptx
MODULE-5_CCN.pptx
 
Summer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpointSummer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpoint
 
Computer Networks Module 1-part 1.pdf
Computer Networks Module 1-part 1.pdfComputer Networks Module 1-part 1.pdf
Computer Networks Module 1-part 1.pdf
 
[Distributed System] ch4. interprocess communication
[Distributed System] ch4. interprocess communication[Distributed System] ch4. interprocess communication
[Distributed System] ch4. interprocess communication
 
RPC in Smalltalk
 RPC in Smalltalk RPC in Smalltalk
RPC in Smalltalk
 
Mcroservices with docker kubernetes, goang and grpc, overview
Mcroservices with docker kubernetes, goang and grpc, overviewMcroservices with docker kubernetes, goang and grpc, overview
Mcroservices with docker kubernetes, goang and grpc, overview
 
Unit 4.pptx
Unit 4.pptxUnit 4.pptx
Unit 4.pptx
 
3 f6 9_distributed_systems
3 f6 9_distributed_systems3 f6 9_distributed_systems
3 f6 9_distributed_systems
 
πP
πPπP
πP
 
Networkprotocolstructurescope 130719081246-phpapp01
Networkprotocolstructurescope 130719081246-phpapp01Networkprotocolstructurescope 130719081246-phpapp01
Networkprotocolstructurescope 130719081246-phpapp01
 
Network protocol structure scope
Network protocol structure scopeNetwork protocol structure scope
Network protocol structure scope
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

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
  • 10.
  • 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