SlideShare a Scribd company logo
8
Most read
9
Most read
11
Most read
Building Microservices with
gRPC
Sathya
Software Developer @ MoneySmart
REST APIs
● Well defined HTTP verbs
● JSON objects can be consumed by JavaScript easily.
● cURL friendly.
● Matured HTTP client libraries support in major languages.
Is it suitable for Microservices?
Not everything is a resource
Calculator Service
Manual Stub Code
Other problems
● Maintenance of the API documentation.
● JSON is text based which added unnecessary burden to the performance when serializing and
deserializing data.
gRPC
gRPC
● High performance RPC system.
● Uses HTTP/2 for transport.
● Uses ProtoBuf as Message Format.
● Supports different modes such as unary and bidirectional streaming.
● Ability to Cancel or Timeout requests.
ProtoBuf
● Mechanism for serializing structured data
● Binary Message Format
● For describing both service interface and message
structure
Advantages:
1. Better Performance
2. Easy to read Service and Message Definition
3. Able to generate Stub Classes Programmatically
Benefits of gRPC
1. Proto files itself act as the service documentation.
2. Automatic code generation for stubs by using proto compilers.
3. Better Performance by using HTTP/2 for transport and protobuf for serializing
Writing gRPC service
Steps:
1. Write Service Definition in Proto file format.
2. Generate Client / Server code using proto compiler.
3. Implement the Server by extending the generated server code.
4. Implement the Client by calling methods using the generated Client Stub.
Questions???
Useful Links
● https://grpc.io/
● https://developers.google.com/protocol-buffers/docs/proto3
● https://github.com/bigcommerce/gruf
● http://avi.im/grpc-errors/#ruby
● https://github.com/avinassh/grpc-errors
www.moneysmart.co/jobs

More Related Content

What's hot (20)

PDF
Introduction to gRPC
Prakash Divy
 
PDF
gRPC and Microservices
Jonathan Gomez
 
PDF
gRPC with java
Knoldus Inc.
 
PDF
Inter-Process Communication in Microservices using gRPC
Shiju Varghese
 
PDF
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Codemotion
 
PDF
Robert Kubis - gRPC - boilerplate to high-performance scalable APIs - code.t...
AboutYouGmbH
 
PPTX
What is gRPC introduction gRPC Explained
jeetendra mandal
 
PDF
OpenAPI and gRPC Side by-Side
Tim Burks
 
PDF
Power-up services with gRPC
The Software House
 
PPTX
Prometheus 101
Paul Podolny
 
PDF
gRPC: The Story of Microservices at Square
Apigee | Google Cloud
 
PPTX
Using the New Apache Flink Kubernetes Operator in a Production Deployment
Flink Forward
 
PDF
gRPC vs REST: let the battle begin!
Alex Borysov
 
PPTX
Apache Flink and what it is used for
Aljoscha Krettek
 
PDF
Microservices, Kubernetes and Istio - A Great Fit!
Animesh Singh
 
PPTX
Introduction to Microservices Patterns
Dimosthenis Botsaris
 
PDF
Spark SQL
Joud Khattab
 
PDF
From Zero to Docker
Abhishek Verma
 
PDF
HTTP/3 in curl
Daniel Stenberg
 
Introduction to gRPC
Prakash Divy
 
gRPC and Microservices
Jonathan Gomez
 
gRPC with java
Knoldus Inc.
 
Inter-Process Communication in Microservices using gRPC
Shiju Varghese
 
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Codemotion
 
Robert Kubis - gRPC - boilerplate to high-performance scalable APIs - code.t...
AboutYouGmbH
 
What is gRPC introduction gRPC Explained
jeetendra mandal
 
OpenAPI and gRPC Side by-Side
Tim Burks
 
Power-up services with gRPC
The Software House
 
Prometheus 101
Paul Podolny
 
gRPC: The Story of Microservices at Square
Apigee | Google Cloud
 
Using the New Apache Flink Kubernetes Operator in a Production Deployment
Flink Forward
 
gRPC vs REST: let the battle begin!
Alex Borysov
 
Apache Flink and what it is used for
Aljoscha Krettek
 
Microservices, Kubernetes and Istio - A Great Fit!
Animesh Singh
 
Introduction to Microservices Patterns
Dimosthenis Botsaris
 
Spark SQL
Joud Khattab
 
From Zero to Docker
Abhishek Verma
 
HTTP/3 in curl
Daniel Stenberg
 

Similar to Building microservices with grpc (20)

PPTX
Building API Using GRPC And Scala
Knoldus Inc.
 
PDF
gRPC: Beyond REST
Domingo Suarez Torres
 
PDF
gRPC Microservices in Go (MEAP V08) Hüseyin Babal
bouicmalapa
 
PDF
Garuda: Automagically Exposing Djagno ORM over gRPC for microservices written...
Dhilipsiva DS
 
PDF
gRPC or Rest, why not both?
Mohammad Murad
 
PDF
gRPC services testing
Thivya Lakshmi
 
PDF
Implementing OpenAPI and GraphQL services with gRPC
Tim Burks
 
PDF
Build microservice with gRPC in golang
Ting-Li Chou
 
PDF
Build your next REST API with gRPC
Tim Burks
 
PDF
APIdays Helsinki 2019 - gRPC: Lightning Fast, Self-Documenting APIs with Moha...
apidays
 
PPTX
CocoaConf: The Language of Mobile Software is APIs
Tim Burks
 
PPTX
Introduction to gRPC. Advantages and Disadvantages
abdulrehmanlatif65
 
PDF
Microservices Communication Patterns with gRPC
WSO2
 
PDF
マイクロサービスバックエンドAPIのためのRESTとgRPC
disc99_
 
PDF
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Mustafa AKIN
 
PPTX
Apa itu gRPC_.pptx
FransiskusBarus1
 
PPTX
Building your First gRPC Service
Jessie Barnett
 
PDF
Driving containerd operations with gRPC
Docker, Inc.
 
PDF
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays
 
PPTX
Grpc present
Phạm Hải Anh
 
Building API Using GRPC And Scala
Knoldus Inc.
 
gRPC: Beyond REST
Domingo Suarez Torres
 
gRPC Microservices in Go (MEAP V08) Hüseyin Babal
bouicmalapa
 
Garuda: Automagically Exposing Djagno ORM over gRPC for microservices written...
Dhilipsiva DS
 
gRPC or Rest, why not both?
Mohammad Murad
 
gRPC services testing
Thivya Lakshmi
 
Implementing OpenAPI and GraphQL services with gRPC
Tim Burks
 
Build microservice with gRPC in golang
Ting-Li Chou
 
Build your next REST API with gRPC
Tim Burks
 
APIdays Helsinki 2019 - gRPC: Lightning Fast, Self-Documenting APIs with Moha...
apidays
 
CocoaConf: The Language of Mobile Software is APIs
Tim Burks
 
Introduction to gRPC. Advantages and Disadvantages
abdulrehmanlatif65
 
Microservices Communication Patterns with gRPC
WSO2
 
マイクロサービスバックエンドAPIのためのRESTとgRPC
disc99_
 
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Mustafa AKIN
 
Apa itu gRPC_.pptx
FransiskusBarus1
 
Building your First gRPC Service
Jessie Barnett
 
Driving containerd operations with gRPC
Docker, Inc.
 
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays
 
Grpc present
Phạm Hải Anh
 
Ad

Recently uploaded (20)

PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Digital Circuits, important subject in CS
contactparinay1
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Ad

Building microservices with grpc

  • 2. REST APIs ● Well defined HTTP verbs ● JSON objects can be consumed by JavaScript easily. ● cURL friendly. ● Matured HTTP client libraries support in major languages.
  • 3. Is it suitable for Microservices?
  • 4. Not everything is a resource Calculator Service
  • 6. Other problems ● Maintenance of the API documentation. ● JSON is text based which added unnecessary burden to the performance when serializing and deserializing data.
  • 8. gRPC ● High performance RPC system. ● Uses HTTP/2 for transport. ● Uses ProtoBuf as Message Format. ● Supports different modes such as unary and bidirectional streaming. ● Ability to Cancel or Timeout requests.
  • 9. ProtoBuf ● Mechanism for serializing structured data ● Binary Message Format ● For describing both service interface and message structure Advantages: 1. Better Performance 2. Easy to read Service and Message Definition 3. Able to generate Stub Classes Programmatically
  • 10. Benefits of gRPC 1. Proto files itself act as the service documentation. 2. Automatic code generation for stubs by using proto compilers. 3. Better Performance by using HTTP/2 for transport and protobuf for serializing
  • 11. Writing gRPC service Steps: 1. Write Service Definition in Proto file format. 2. Generate Client / Server code using proto compiler. 3. Implement the Server by extending the generated server code. 4. Implement the Client by calling methods using the generated Client Stub.
  • 13. Useful Links ● https://grpc.io/ ● https://developers.google.com/protocol-buffers/docs/proto3 ● https://github.com/bigcommerce/gruf ● http://avi.im/grpc-errors/#ruby ● https://github.com/avinassh/grpc-errors