SlideShare a Scribd company logo
#DevoxxUK @LeanderReimer
REST in Peace. Long live gRPC!
	
Mario-Leander Reimer


	
@LeanderReimer


	
https://lreimer.github.io


https://speakerdeck.com/lreimer


	
https://www.qaware.de
#DevoxxUK @LeanderReimer
Mario-Leander Reimer


Principal Software Architect


@LeanderReimer


#cloudnativenerd #qaware
#DevoxxUK @LeanderReimer
Agenda
REST Beer
Service
REST Beer
Service
application/json
application/x-protobuf
gRPC Beer
Service
gRPC Beer
Service
gRPC Beer
Web UI
gRPC Beer
Client
gRPC REST
Gateway
application/json
gRPC LB
Nginx
gRPC
gRPC
gRPC
gRPC
gRPC
Web UI
gRPC Web
Envoy
TypeScript
#DevoxxUK @LeanderReimer
Code and Demos
lreimer/from-rest-to-grpc
#DevoxxUK @LeanderReimer
"One cannot not communicate."


- Paul Watzlawick
#DevoxxUK @LeanderReimer
A Quick History Lesson on Inter Process Communication
HTTP/1.0


Mai 1996


RFC 1945
RPC


14.01.1976


RFC 707
Java RMI


Feb 1997


JDK 1.1
REST


2000


by Roy T.
Fielding
RPC


Oct 1983


Birrel and
Nielson
CORBA 1.0


Oct 1991
CORBA 2.0


August 1996
DCOM


18.09.1996


Win95
HTTP/1.1


Juni 1999


RFC 2616
CORBA 2.3


Juni 1999
XML-RPC


1998
gRPC 1.0


Aug 2016
CORBA 3.0


July 2002
SOAP 1.2


2003
RESTful
Applications


2014 (?)
HTTP/2.0


Mai 2015


RFC 7540
#DevoxxUK @LeanderReimer
Agenda
REST Beer
Service
REST Beer
Service
application/json
application/x-protobuf
gRPC Beer
Service
gRPC Beer
Service
gRPC Beer
Web UI
gRPC Beer
Client
gRPC REST
Gateway
application/json
gRPC LB
Nginx
gRPC
gRPC
gRPC
gRPC
gRPC
Web UI
gRPC Web
Envoy
TypeScript
#DevoxxUK @LeanderReimer
REST APIs
GET /api/beers


POST /api/beers


GET /api/beers/{asin}


PUT /api/beers/{asin}


DELETE /api/beers/{asin}
HTTP/1.1 200 OK


Content-Length: 139


Content-Type: application/json; charset=utf-8


Date: Wed, 10 Nov 2021 10:21:54 GMT


{


"alcohol": 5.6,


"asin": "B01AU6LWNC",


"brand": "Augustiner Brauerei München",


"country": "Germany",


"name": "Edelstoff Exportbier",


"type": "Lager"


}
GET /api/beers/B01AU6LWNC HTTP/1.1


Accept: application/json


Accept-Encoding: gzip, deflate


Connection: keep-alive


Host: localhost:8080


User-Agent: HTTPie/2.5.0
„Pretty URLs with JSON payloads“


— @hhariri
Verbs
Nouns
Response
Request
#DevoxxUK @LeanderReimer
Richardson REST Maturity Model
POST /bookingService HTTP/1.1


[various other headers]


<makeBookingRequest date="2010-01-04" persons="2"/>
https://martinfowler.com/articles/richardsonMaturityModel.html
POST /bookings HTTP/1.1


[various other headers]


<getBookingRequest id="ID-1234567890" user"lreimer"/>
GET /bookings/1234567890?user=lreimer HTTP/1.1


Accept: application/json


[various other headers]
GET /bookings/1234567890?user=lreimer HTTP/1.1


Accept: application/json


Link: /users/lreimer


[various other headers]
#DevoxxUK @LeanderReimer
There is no Readability in ISO 25010!
Software Product


Quality


(ISO 25010)
● Modularity


● Reusability


● Analysability


● Modifiability


● Testability
● Adaptability


● Installability


● Replaceability
● Confidentiality


● Integrity


● Non-repudiation


● Authenticity


● Accountability
● Maturity


● Availability


● Fault Tolerance


● Recoverability
Maintainability
Portability
Security
Reliability ● Co-existence


● Interoperability
Compatibility
● Time Behaviour


● Resource Utilization


● Capacity
Efficiency
● Completeness


● Correctness


● Appropriateness
Functional Suitability
● Operability


● Learnability


● UI Aesthetics


● Accessibility
Usability
#DevoxxUK @LeanderReimer
The 8 Fallacies of Distributed Computing
1. The network is reliable


2. Latency is zero


3. Bandwidth is infinite


4. The network is secure


5. Topology doesn’t change


6. There is one administrator


7. Transport cost is zero


8. The network is homogeneous
#DevoxxUK @LeanderReimer
Protocol Buffers in a Nutshell
• Like XML or JSON - just smaller, faster and easier!


• Language-neutral, platform-neutral extensible mechanism for serializing
structured data


• Google Protobuf uses an efficient binary format to serialize data structures


• Data structures and message payloads are defined using an Interface Definition
Language (IDL)


• Protocol Buffers supports code generation for Java, Python, Objective-C, C++,
Kotlin, Dart, Go, Ruby und C#.


• Protobuf supports schema evolution and extension. Backwards and forwards
compatibility are supported
#DevoxxUK @LeanderReimer
Protobuf IDL with Java Demo
#DevoxxUK @LeanderReimer
JSON vs. Protobuf Performance
• Protobuf on a non-compressed environment, the requests took 78% less time than the
JSON requests. The binary format performed almost 5 times faster than the text format.


• Protobuf on a compressed environment performed 6 times faster, taking only 25ms to
handle requests that took 150ms on a JSON format.
Disclaimer: please perform your own benchmarks for your specific use case!
https://auth0.com/blog/beating-json-performance-with-protobuf/


https://blog.qaware.de/posts/binary-data-format-comparison/
#DevoxxUK @LeanderReimer
Agenda
REST Beer
Service
REST Beer
Service
application/json
application/x-protobuf
gRPC Beer
Service
gRPC Beer
Service
gRPC Beer
Web UI
gRPC Beer
Client
gRPC REST
Gateway
application/json
gRPC LB
Nginx
gRPC
gRPC
gRPC
gRPC
gRPC
Web UI
gRPC Web
Envoy
TypeScript
#DevoxxUK @LeanderReimer
gRPC in a Nutshell
• A modern, high performance, open source and universal RPC framework.


• Uses HTTP/2 as modern Web-friendly transport protocol (Multiplexing, TLS,
compression)


• Supports several types of communication: classic request-response as well as
streaming from Client-side, Server-side, Uni- and Bi-Directional


• Uses Protobuf IDL to define services and payload messages


• Client and server stubs are generated from the IDL easily for several languages


• Support various load balancing options: proxy, client-side and look-aside balancing


• Flexible support for tracing, health checks and authentication
#DevoxxUK @LeanderReimer
gRPC Service with Java Demo
Service Definition
#DevoxxUK @LeanderReimer
Agenda
REST Beer
Service
REST Beer
Service
application/json
application/x-protobuf
gRPC Beer
Service
gRPC Beer
Service
gRPC Beer
Web UI
gRPC Beer
Client
gRPC REST
Gateway
application/json
gRPC LB
Nginx
gRPC
gRPC
gRPC
gRPC
gRPC
Web UI
gRPC Web
Envoy
TypeScript
#DevoxxUK @LeanderReimer
gRPC Ecosystem in a Nutshell
• Different projects from the gRPC ecosystem enable good interoperability


• gRPC Gateway - https://grpc-ecosystem.github.io/grpc-gateway/


• gRPC Web - https://grpc.io/docs/platforms/web/quickstart/


• https://blog.envoyproxy.io/envoy-and-grpc-web-a-fresh-new-alternative-to-
rest-6504ce7eb880


• Support various load balancing options: proxy, client-side and look-aside balancing


• Nginx - https://nginx.org/en/docs/http/ngx_http_grpc_module.html


• Envoy - https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/
other_protocols/grpc
#DevoxxUK @LeanderReimer
gRPC Gateway Demo
Map gRPC call to GET request path
Map {asin} path param to request
Use beer field as response body
Map POST body to request
#DevoxxUK @LeanderReimer
gRPC Web Demo
Enable gRPC Web Envoy Filter
#DevoxxUK @LeanderReimer
&
&
	
Mario-Leander Reimer


	
@LeanderReimer


	
https://lreimer.github.io


https://speakerdeck.com/lreimer


	
https://www.qaware.de

More Related Content

Similar to REST in Peace. Long live gRPC!

Building Microservices with gRPC and NATS
Building Microservices with gRPC and NATSBuilding Microservices with gRPC and NATS
Building Microservices with gRPC and NATS
Shiju Varghese
 
Cloud native IPC for Microservices Workshop @ Containerdays 2022
Cloud native IPC for Microservices Workshop @ Containerdays 2022Cloud native IPC for Microservices Workshop @ Containerdays 2022
Cloud native IPC for Microservices Workshop @ Containerdays 2022
QAware GmbH
 
Inter-Process Communication in Microservices using gRPC
Inter-Process Communication in Microservices using gRPCInter-Process Communication in Microservices using gRPC
Inter-Process Communication in Microservices using gRPC
Shiju Varghese
 
CocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsCocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIs
Tim Burks
 
REST in Peace. Long live gRPC! @ Codineers
REST in Peace. Long live gRPC! @ CodineersREST in Peace. Long live gRPC! @ Codineers
REST in Peace. Long live gRPC! @ Codineers
QAware GmbH
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
Josef Adersberger
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
QAware GmbH
 
REST vs gRPC: Battle of API's
REST vs gRPC: Battle of API'sREST vs gRPC: Battle of API's
REST vs gRPC: Battle of API's
Luram Archanjo
 
Bye bye WCF, hello gRPC
Bye bye WCF, hello gRPCBye bye WCF, hello gRPC
Bye bye WCF, hello gRPC
Swaminathan Vetri
 
Microservices & API Gateways
Microservices & API Gateways Microservices & API Gateways
Microservices & API Gateways
Kong Inc.
 
Yotpo microservices
Yotpo microservicesYotpo microservices
Yotpo microservices
Ron Barabash
 
Micro Services Architecture
Micro Services ArchitectureMicro Services Architecture
Micro Services Architecture
Ranjan Baisak
 
Rpc framework
Rpc frameworkRpc framework
Rpc framework
july mon
 
KrakenD API Gateway
KrakenD API GatewayKrakenD API Gateway
KrakenD API Gateway
Albert Lombarte
 
Go at uber
Go at uberGo at uber
Go at uber
Rob Skillington
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2
 
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}
Md. Sadhan Sarker
 
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
Phil Wilkins
 
OpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-SideOpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-Side
Tim Burks
 
LF_APIStrat17_OpenAPI and gRPC Side-by-Side
LF_APIStrat17_OpenAPI and gRPC Side-by-SideLF_APIStrat17_OpenAPI and gRPC Side-by-Side
LF_APIStrat17_OpenAPI and gRPC Side-by-Side
LF_APIStrat
 

Similar to REST in Peace. Long live gRPC! (20)

Building Microservices with gRPC and NATS
Building Microservices with gRPC and NATSBuilding Microservices with gRPC and NATS
Building Microservices with gRPC and NATS
 
Cloud native IPC for Microservices Workshop @ Containerdays 2022
Cloud native IPC for Microservices Workshop @ Containerdays 2022Cloud native IPC for Microservices Workshop @ Containerdays 2022
Cloud native IPC for Microservices Workshop @ Containerdays 2022
 
Inter-Process Communication in Microservices using gRPC
Inter-Process Communication in Microservices using gRPCInter-Process Communication in Microservices using gRPC
Inter-Process Communication in Microservices using gRPC
 
CocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsCocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIs
 
REST in Peace. Long live gRPC! @ Codineers
REST in Peace. Long live gRPC! @ CodineersREST in Peace. Long live gRPC! @ Codineers
REST in Peace. Long live gRPC! @ Codineers
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
 
REST vs gRPC: Battle of API's
REST vs gRPC: Battle of API'sREST vs gRPC: Battle of API's
REST vs gRPC: Battle of API's
 
Bye bye WCF, hello gRPC
Bye bye WCF, hello gRPCBye bye WCF, hello gRPC
Bye bye WCF, hello gRPC
 
Microservices & API Gateways
Microservices & API Gateways Microservices & API Gateways
Microservices & API Gateways
 
Yotpo microservices
Yotpo microservicesYotpo microservices
Yotpo microservices
 
Micro Services Architecture
Micro Services ArchitectureMicro Services Architecture
Micro Services Architecture
 
Rpc framework
Rpc frameworkRpc framework
Rpc framework
 
KrakenD API Gateway
KrakenD API GatewayKrakenD API Gateway
KrakenD API Gateway
 
Go at uber
Go at uberGo at uber
Go at uber
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}
 
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
 
OpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-SideOpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-Side
 
LF_APIStrat17_OpenAPI and gRPC Side-by-Side
LF_APIStrat17_OpenAPI and gRPC Side-by-SideLF_APIStrat17_OpenAPI and gRPC Side-by-Side
LF_APIStrat17_OpenAPI and gRPC Side-by-Side
 

More from QAware GmbH

Frontends mit Hilfe von KI entwickeln.pdf
Frontends mit Hilfe von KI entwickeln.pdfFrontends mit Hilfe von KI entwickeln.pdf
Frontends mit Hilfe von KI entwickeln.pdf
QAware GmbH
 
Mit ChatGPT Dinosaurier besiegen - Möglichkeiten und Grenzen von LLM für die ...
Mit ChatGPT Dinosaurier besiegen - Möglichkeiten und Grenzen von LLM für die ...Mit ChatGPT Dinosaurier besiegen - Möglichkeiten und Grenzen von LLM für die ...
Mit ChatGPT Dinosaurier besiegen - Möglichkeiten und Grenzen von LLM für die ...
QAware GmbH
 
50 Shades of K8s Autoscaling #JavaLand24.pdf
50 Shades of K8s Autoscaling #JavaLand24.pdf50 Shades of K8s Autoscaling #JavaLand24.pdf
50 Shades of K8s Autoscaling #JavaLand24.pdf
QAware GmbH
 
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
QAware GmbH
 
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN MainzFully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
QAware GmbH
 
Down the Ivory Tower towards Agile Architecture
Down the Ivory Tower towards Agile ArchitectureDown the Ivory Tower towards Agile Architecture
Down the Ivory Tower towards Agile Architecture
QAware GmbH
 
"Mixed" Scrum-Teams – Die richtige Mischung macht's!
"Mixed" Scrum-Teams – Die richtige Mischung macht's!"Mixed" Scrum-Teams – Die richtige Mischung macht's!
"Mixed" Scrum-Teams – Die richtige Mischung macht's!
QAware GmbH
 
Make Developers Fly: Principles for Platform Engineering
Make Developers Fly: Principles for Platform EngineeringMake Developers Fly: Principles for Platform Engineering
Make Developers Fly: Principles for Platform Engineering
QAware GmbH
 
Der Tod der Testpyramide? – Frontend-Testing mit Playwright
Der Tod der Testpyramide? – Frontend-Testing mit PlaywrightDer Tod der Testpyramide? – Frontend-Testing mit Playwright
Der Tod der Testpyramide? – Frontend-Testing mit Playwright
QAware GmbH
 
Was kommt nach den SPAs
Was kommt nach den SPAsWas kommt nach den SPAs
Was kommt nach den SPAs
QAware GmbH
 
Cloud Migration mit KI: der Turbo
Cloud Migration mit KI: der Turbo Cloud Migration mit KI: der Turbo
Cloud Migration mit KI: der Turbo
QAware GmbH
 
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
 Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See... Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
QAware GmbH
 
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
QAware GmbH
 
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
QAware GmbH
 
Kubernetes with Cilium in AWS - Experience Report!
Kubernetes with Cilium in AWS - Experience Report!Kubernetes with Cilium in AWS - Experience Report!
Kubernetes with Cilium in AWS - Experience Report!
QAware GmbH
 
50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling
QAware GmbH
 
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAPKontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
QAware GmbH
 
Service Mesh Pain & Gain. Experiences from a client project.
Service Mesh Pain & Gain. Experiences from a client project.Service Mesh Pain & Gain. Experiences from a client project.
Service Mesh Pain & Gain. Experiences from a client project.
QAware GmbH
 
50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling
QAware GmbH
 
Blue turns green! Approaches and technologies for sustainable K8s clusters.
Blue turns green! Approaches and technologies for sustainable K8s clusters.Blue turns green! Approaches and technologies for sustainable K8s clusters.
Blue turns green! Approaches and technologies for sustainable K8s clusters.
QAware GmbH
 

More from QAware GmbH (20)

Frontends mit Hilfe von KI entwickeln.pdf
Frontends mit Hilfe von KI entwickeln.pdfFrontends mit Hilfe von KI entwickeln.pdf
Frontends mit Hilfe von KI entwickeln.pdf
 
Mit ChatGPT Dinosaurier besiegen - Möglichkeiten und Grenzen von LLM für die ...
Mit ChatGPT Dinosaurier besiegen - Möglichkeiten und Grenzen von LLM für die ...Mit ChatGPT Dinosaurier besiegen - Möglichkeiten und Grenzen von LLM für die ...
Mit ChatGPT Dinosaurier besiegen - Möglichkeiten und Grenzen von LLM für die ...
 
50 Shades of K8s Autoscaling #JavaLand24.pdf
50 Shades of K8s Autoscaling #JavaLand24.pdf50 Shades of K8s Autoscaling #JavaLand24.pdf
50 Shades of K8s Autoscaling #JavaLand24.pdf
 
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
 
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN MainzFully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
 
Down the Ivory Tower towards Agile Architecture
Down the Ivory Tower towards Agile ArchitectureDown the Ivory Tower towards Agile Architecture
Down the Ivory Tower towards Agile Architecture
 
"Mixed" Scrum-Teams – Die richtige Mischung macht's!
"Mixed" Scrum-Teams – Die richtige Mischung macht's!"Mixed" Scrum-Teams – Die richtige Mischung macht's!
"Mixed" Scrum-Teams – Die richtige Mischung macht's!
 
Make Developers Fly: Principles for Platform Engineering
Make Developers Fly: Principles for Platform EngineeringMake Developers Fly: Principles for Platform Engineering
Make Developers Fly: Principles for Platform Engineering
 
Der Tod der Testpyramide? – Frontend-Testing mit Playwright
Der Tod der Testpyramide? – Frontend-Testing mit PlaywrightDer Tod der Testpyramide? – Frontend-Testing mit Playwright
Der Tod der Testpyramide? – Frontend-Testing mit Playwright
 
Was kommt nach den SPAs
Was kommt nach den SPAsWas kommt nach den SPAs
Was kommt nach den SPAs
 
Cloud Migration mit KI: der Turbo
Cloud Migration mit KI: der Turbo Cloud Migration mit KI: der Turbo
Cloud Migration mit KI: der Turbo
 
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
 Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See... Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
 
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
 
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
 
Kubernetes with Cilium in AWS - Experience Report!
Kubernetes with Cilium in AWS - Experience Report!Kubernetes with Cilium in AWS - Experience Report!
Kubernetes with Cilium in AWS - Experience Report!
 
50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling
 
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAPKontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
 
Service Mesh Pain & Gain. Experiences from a client project.
Service Mesh Pain & Gain. Experiences from a client project.Service Mesh Pain & Gain. Experiences from a client project.
Service Mesh Pain & Gain. Experiences from a client project.
 
50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling
 
Blue turns green! Approaches and technologies for sustainable K8s clusters.
Blue turns green! Approaches and technologies for sustainable K8s clusters.Blue turns green! Approaches and technologies for sustainable K8s clusters.
Blue turns green! Approaches and technologies for sustainable K8s clusters.
 

Recently uploaded

Sin Involves More Than You Might Think (We'll Explain)
Sin Involves More Than You Might Think (We'll Explain)Sin Involves More Than You Might Think (We'll Explain)
Sin Involves More Than You Might Think (We'll Explain)
sapna sharmap11
 
The University of New England degree offer diploma Transcript
The University of New England  degree offer diploma TranscriptThe University of New England  degree offer diploma Transcript
The University of New England degree offer diploma Transcript
taqyea
 
Seamlessly Pay Online, Pay In Stores or Send Money
Seamlessly Pay Online, Pay In Stores or Send MoneySeamlessly Pay Online, Pay In Stores or Send Money
Seamlessly Pay Online, Pay In Stores or Send Money
gargtinna79
 
Universidad Camilo José Cela degree offer diploma Transcript
Universidad Camilo José Cela  degree offer diploma TranscriptUniversidad Camilo José Cela  degree offer diploma Transcript
Universidad Camilo José Cela degree offer diploma Transcript
taqyea
 
Beautiful Girls Call Pune 000XX00000 Provide Best And Top Girl Service And No...
Beautiful Girls Call Pune 000XX00000 Provide Best And Top Girl Service And No...Beautiful Girls Call Pune 000XX00000 Provide Best And Top Girl Service And No...
Beautiful Girls Call Pune 000XX00000 Provide Best And Top Girl Service And No...
birajmohan012
 
OpenMetadata Spotlight - OpenMetadata @ Aspire by Vinol Joy Dsouza
OpenMetadata Spotlight - OpenMetadata @ Aspire by Vinol Joy DsouzaOpenMetadata Spotlight - OpenMetadata @ Aspire by Vinol Joy Dsouza
OpenMetadata Spotlight - OpenMetadata @ Aspire by Vinol Joy Dsouza
OpenMetadata
 
Harendra Singh, AI Strategy and Consulting Portfolio
Harendra Singh, AI Strategy and Consulting PortfolioHarendra Singh, AI Strategy and Consulting Portfolio
Harendra Singh, AI Strategy and Consulting Portfolio
harendmgr
 
Data analytics and Access Program Recommendations
Data analytics and Access Program RecommendationsData analytics and Access Program Recommendations
Data analytics and Access Program Recommendations
hemantsharmaus
 
Contemporary Islamic Finance Practices_2022.pdf
Contemporary Islamic Finance Practices_2022.pdfContemporary Islamic Finance Practices_2022.pdf
Contemporary Islamic Finance Practices_2022.pdf
DngQuct12A1
 
University of the Sunshine Coast degree offer diploma Transcript
University of the Sunshine Coast  degree offer diploma TranscriptUniversity of the Sunshine Coast  degree offer diploma Transcript
University of the Sunshine Coast degree offer diploma Transcript
taqyea
 
International Journal of Fuzzy Logic Systems (IJFLS)
International Journal of Fuzzy Logic Systems (IJFLS)International Journal of Fuzzy Logic Systems (IJFLS)
International Journal of Fuzzy Logic Systems (IJFLS)
ijfls
 
Universidad de Valladolid degree offer diploma Transcript
Universidad de Valladolid  degree offer diploma TranscriptUniversidad de Valladolid  degree offer diploma Transcript
Universidad de Valladolid degree offer diploma Transcript
taqyea
 
PHENOMENOLOGY and Interpretive phenomenological analysis
PHENOMENOLOGY and Interpretive phenomenological analysisPHENOMENOLOGY and Interpretive phenomenological analysis
PHENOMENOLOGY and Interpretive phenomenological analysis
CharmoliApumKhrime
 
Willis Tower //Sears Tower- Supertall Building .pdf
Willis Tower //Sears Tower- Supertall Building .pdfWillis Tower //Sears Tower- Supertall Building .pdf
Willis Tower //Sears Tower- Supertall Building .pdf
LINAT
 
Maruti Wagon R on road price in Faridabad - CarDekho
Maruti Wagon R on road price in Faridabad - CarDekhoMaruti Wagon R on road price in Faridabad - CarDekho
Maruti Wagon R on road price in Faridabad - CarDekho
kamli sharma#S10
 
Ahrefs SEO Report Template for Marketer.pptx
Ahrefs SEO Report Template for Marketer.pptxAhrefs SEO Report Template for Marketer.pptx
Ahrefs SEO Report Template for Marketer.pptx
tylermmo95
 
potential development of the A* search algorithm specifically
potential development of the A* search algorithm specificallypotential development of the A* search algorithm specifically
potential development of the A* search algorithm specifically
huseindihon
 
Universidad de Alcalá degree offer diploma Transcript
Universidad de Alcalá  degree offer diploma TranscriptUniversidad de Alcalá  degree offer diploma Transcript
Universidad de Alcalá degree offer diploma Transcript
taqyea
 
ch8_multiplexing cs553 st07 slide share ss
ch8_multiplexing cs553 st07 slide share ssch8_multiplexing cs553 st07 slide share ss
ch8_multiplexing cs553 st07 slide share ss
MinThetLwin1
 
Girls Call Vadodara 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Vadodara 000XX00000 Provide Best And Top Girl Service And No1 in CityGirls Call Vadodara 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Vadodara 000XX00000 Provide Best And Top Girl Service And No1 in City
gargnatasha985
 

Recently uploaded (20)

Sin Involves More Than You Might Think (We'll Explain)
Sin Involves More Than You Might Think (We'll Explain)Sin Involves More Than You Might Think (We'll Explain)
Sin Involves More Than You Might Think (We'll Explain)
 
The University of New England degree offer diploma Transcript
The University of New England  degree offer diploma TranscriptThe University of New England  degree offer diploma Transcript
The University of New England degree offer diploma Transcript
 
Seamlessly Pay Online, Pay In Stores or Send Money
Seamlessly Pay Online, Pay In Stores or Send MoneySeamlessly Pay Online, Pay In Stores or Send Money
Seamlessly Pay Online, Pay In Stores or Send Money
 
Universidad Camilo José Cela degree offer diploma Transcript
Universidad Camilo José Cela  degree offer diploma TranscriptUniversidad Camilo José Cela  degree offer diploma Transcript
Universidad Camilo José Cela degree offer diploma Transcript
 
Beautiful Girls Call Pune 000XX00000 Provide Best And Top Girl Service And No...
Beautiful Girls Call Pune 000XX00000 Provide Best And Top Girl Service And No...Beautiful Girls Call Pune 000XX00000 Provide Best And Top Girl Service And No...
Beautiful Girls Call Pune 000XX00000 Provide Best And Top Girl Service And No...
 
OpenMetadata Spotlight - OpenMetadata @ Aspire by Vinol Joy Dsouza
OpenMetadata Spotlight - OpenMetadata @ Aspire by Vinol Joy DsouzaOpenMetadata Spotlight - OpenMetadata @ Aspire by Vinol Joy Dsouza
OpenMetadata Spotlight - OpenMetadata @ Aspire by Vinol Joy Dsouza
 
Harendra Singh, AI Strategy and Consulting Portfolio
Harendra Singh, AI Strategy and Consulting PortfolioHarendra Singh, AI Strategy and Consulting Portfolio
Harendra Singh, AI Strategy and Consulting Portfolio
 
Data analytics and Access Program Recommendations
Data analytics and Access Program RecommendationsData analytics and Access Program Recommendations
Data analytics and Access Program Recommendations
 
Contemporary Islamic Finance Practices_2022.pdf
Contemporary Islamic Finance Practices_2022.pdfContemporary Islamic Finance Practices_2022.pdf
Contemporary Islamic Finance Practices_2022.pdf
 
University of the Sunshine Coast degree offer diploma Transcript
University of the Sunshine Coast  degree offer diploma TranscriptUniversity of the Sunshine Coast  degree offer diploma Transcript
University of the Sunshine Coast degree offer diploma Transcript
 
International Journal of Fuzzy Logic Systems (IJFLS)
International Journal of Fuzzy Logic Systems (IJFLS)International Journal of Fuzzy Logic Systems (IJFLS)
International Journal of Fuzzy Logic Systems (IJFLS)
 
Universidad de Valladolid degree offer diploma Transcript
Universidad de Valladolid  degree offer diploma TranscriptUniversidad de Valladolid  degree offer diploma Transcript
Universidad de Valladolid degree offer diploma Transcript
 
PHENOMENOLOGY and Interpretive phenomenological analysis
PHENOMENOLOGY and Interpretive phenomenological analysisPHENOMENOLOGY and Interpretive phenomenological analysis
PHENOMENOLOGY and Interpretive phenomenological analysis
 
Willis Tower //Sears Tower- Supertall Building .pdf
Willis Tower //Sears Tower- Supertall Building .pdfWillis Tower //Sears Tower- Supertall Building .pdf
Willis Tower //Sears Tower- Supertall Building .pdf
 
Maruti Wagon R on road price in Faridabad - CarDekho
Maruti Wagon R on road price in Faridabad - CarDekhoMaruti Wagon R on road price in Faridabad - CarDekho
Maruti Wagon R on road price in Faridabad - CarDekho
 
Ahrefs SEO Report Template for Marketer.pptx
Ahrefs SEO Report Template for Marketer.pptxAhrefs SEO Report Template for Marketer.pptx
Ahrefs SEO Report Template for Marketer.pptx
 
potential development of the A* search algorithm specifically
potential development of the A* search algorithm specificallypotential development of the A* search algorithm specifically
potential development of the A* search algorithm specifically
 
Universidad de Alcalá degree offer diploma Transcript
Universidad de Alcalá  degree offer diploma TranscriptUniversidad de Alcalá  degree offer diploma Transcript
Universidad de Alcalá degree offer diploma Transcript
 
ch8_multiplexing cs553 st07 slide share ss
ch8_multiplexing cs553 st07 slide share ssch8_multiplexing cs553 st07 slide share ss
ch8_multiplexing cs553 st07 slide share ss
 
Girls Call Vadodara 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Vadodara 000XX00000 Provide Best And Top Girl Service And No1 in CityGirls Call Vadodara 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Vadodara 000XX00000 Provide Best And Top Girl Service And No1 in City
 

REST in Peace. Long live gRPC!

  • 1. #DevoxxUK @LeanderReimer REST in Peace. Long live gRPC! Mario-Leander Reimer @LeanderReimer https://lreimer.github.io https://speakerdeck.com/lreimer https://www.qaware.de
  • 2. #DevoxxUK @LeanderReimer Mario-Leander Reimer Principal Software Architect @LeanderReimer #cloudnativenerd #qaware
  • 3. #DevoxxUK @LeanderReimer Agenda REST Beer Service REST Beer Service application/json application/x-protobuf gRPC Beer Service gRPC Beer Service gRPC Beer Web UI gRPC Beer Client gRPC REST Gateway application/json gRPC LB Nginx gRPC gRPC gRPC gRPC gRPC Web UI gRPC Web Envoy TypeScript
  • 4. #DevoxxUK @LeanderReimer Code and Demos lreimer/from-rest-to-grpc
  • 5. #DevoxxUK @LeanderReimer "One cannot not communicate." - Paul Watzlawick
  • 6. #DevoxxUK @LeanderReimer A Quick History Lesson on Inter Process Communication HTTP/1.0 Mai 1996 RFC 1945 RPC 14.01.1976 RFC 707 Java RMI Feb 1997 JDK 1.1 REST 2000 by Roy T. Fielding RPC Oct 1983 Birrel and Nielson CORBA 1.0 Oct 1991 CORBA 2.0 August 1996 DCOM 18.09.1996 Win95 HTTP/1.1 Juni 1999 RFC 2616 CORBA 2.3 Juni 1999 XML-RPC 1998 gRPC 1.0 Aug 2016 CORBA 3.0 July 2002 SOAP 1.2 2003 RESTful Applications 2014 (?) HTTP/2.0 Mai 2015 RFC 7540
  • 7. #DevoxxUK @LeanderReimer Agenda REST Beer Service REST Beer Service application/json application/x-protobuf gRPC Beer Service gRPC Beer Service gRPC Beer Web UI gRPC Beer Client gRPC REST Gateway application/json gRPC LB Nginx gRPC gRPC gRPC gRPC gRPC Web UI gRPC Web Envoy TypeScript
  • 8. #DevoxxUK @LeanderReimer REST APIs GET /api/beers POST /api/beers 
 GET /api/beers/{asin} PUT /api/beers/{asin} DELETE /api/beers/{asin} HTTP/1.1 200 OK Content-Length: 139 Content-Type: application/json; charset=utf-8 Date: Wed, 10 Nov 2021 10:21:54 GMT { "alcohol": 5.6, "asin": "B01AU6LWNC", "brand": "Augustiner Brauerei München", "country": "Germany", "name": "Edelstoff Exportbier", "type": "Lager" } GET /api/beers/B01AU6LWNC HTTP/1.1 Accept: application/json Accept-Encoding: gzip, deflate Connection: keep-alive Host: localhost:8080 User-Agent: HTTPie/2.5.0 „Pretty URLs with JSON payloads“ 
 — @hhariri Verbs Nouns Response Request
  • 9. #DevoxxUK @LeanderReimer Richardson REST Maturity Model POST /bookingService HTTP/1.1 [various other headers] <makeBookingRequest date="2010-01-04" persons="2"/> https://martinfowler.com/articles/richardsonMaturityModel.html POST /bookings HTTP/1.1 [various other headers] <getBookingRequest id="ID-1234567890" user"lreimer"/> GET /bookings/1234567890?user=lreimer HTTP/1.1 Accept: application/json [various other headers] GET /bookings/1234567890?user=lreimer HTTP/1.1 Accept: application/json Link: /users/lreimer [various other headers]
  • 10. #DevoxxUK @LeanderReimer There is no Readability in ISO 25010! Software Product Quality (ISO 25010) ● Modularity ● Reusability ● Analysability ● Modifiability ● Testability ● Adaptability ● Installability ● Replaceability ● Confidentiality ● Integrity ● Non-repudiation ● Authenticity ● Accountability ● Maturity ● Availability ● Fault Tolerance ● Recoverability Maintainability Portability Security Reliability ● Co-existence ● Interoperability Compatibility ● Time Behaviour ● Resource Utilization ● Capacity Efficiency ● Completeness ● Correctness ● Appropriateness Functional Suitability ● Operability ● Learnability ● UI Aesthetics ● Accessibility Usability
  • 11. #DevoxxUK @LeanderReimer The 8 Fallacies of Distributed Computing 1. The network is reliable 2. Latency is zero 3. Bandwidth is infinite 4. The network is secure 
 5. Topology doesn’t change 6. There is one administrator 7. Transport cost is zero 8. The network is homogeneous
  • 12. #DevoxxUK @LeanderReimer Protocol Buffers in a Nutshell • Like XML or JSON - just smaller, faster and easier! • Language-neutral, platform-neutral extensible mechanism for serializing structured data • Google Protobuf uses an efficient binary format to serialize data structures • Data structures and message payloads are defined using an Interface Definition Language (IDL) • Protocol Buffers supports code generation for Java, Python, Objective-C, C++, Kotlin, Dart, Go, Ruby und C#. • Protobuf supports schema evolution and extension. Backwards and forwards compatibility are supported
  • 14. #DevoxxUK @LeanderReimer JSON vs. Protobuf Performance • Protobuf on a non-compressed environment, the requests took 78% less time than the JSON requests. The binary format performed almost 5 times faster than the text format. • Protobuf on a compressed environment performed 6 times faster, taking only 25ms to handle requests that took 150ms on a JSON format. Disclaimer: please perform your own benchmarks for your specific use case! https://auth0.com/blog/beating-json-performance-with-protobuf/ https://blog.qaware.de/posts/binary-data-format-comparison/
  • 15. #DevoxxUK @LeanderReimer Agenda REST Beer Service REST Beer Service application/json application/x-protobuf gRPC Beer Service gRPC Beer Service gRPC Beer Web UI gRPC Beer Client gRPC REST Gateway application/json gRPC LB Nginx gRPC gRPC gRPC gRPC gRPC Web UI gRPC Web Envoy TypeScript
  • 16. #DevoxxUK @LeanderReimer gRPC in a Nutshell • A modern, high performance, open source and universal RPC framework. • Uses HTTP/2 as modern Web-friendly transport protocol (Multiplexing, TLS, compression) • Supports several types of communication: classic request-response as well as streaming from Client-side, Server-side, Uni- and Bi-Directional • Uses Protobuf IDL to define services and payload messages • Client and server stubs are generated from the IDL easily for several languages • Support various load balancing options: proxy, client-side and look-aside balancing • Flexible support for tracing, health checks and authentication
  • 17. #DevoxxUK @LeanderReimer gRPC Service with Java Demo Service Definition
  • 18. #DevoxxUK @LeanderReimer Agenda REST Beer Service REST Beer Service application/json application/x-protobuf gRPC Beer Service gRPC Beer Service gRPC Beer Web UI gRPC Beer Client gRPC REST Gateway application/json gRPC LB Nginx gRPC gRPC gRPC gRPC gRPC Web UI gRPC Web Envoy TypeScript
  • 19. #DevoxxUK @LeanderReimer gRPC Ecosystem in a Nutshell • Different projects from the gRPC ecosystem enable good interoperability • gRPC Gateway - https://grpc-ecosystem.github.io/grpc-gateway/ • gRPC Web - https://grpc.io/docs/platforms/web/quickstart/ • https://blog.envoyproxy.io/envoy-and-grpc-web-a-fresh-new-alternative-to- rest-6504ce7eb880 • Support various load balancing options: proxy, client-side and look-aside balancing • Nginx - https://nginx.org/en/docs/http/ngx_http_grpc_module.html • Envoy - https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/ other_protocols/grpc
  • 20. #DevoxxUK @LeanderReimer gRPC Gateway Demo Map gRPC call to GET request path Map {asin} path param to request Use beer field as response body Map POST body to request
  • 21. #DevoxxUK @LeanderReimer gRPC Web Demo Enable gRPC Web Envoy Filter