SlideShare a Scribd company logo
qaware.de
REST in Peace. Long live gRPC!
Codineers Rosenheim
Mario-Leander Reimer
mario-leander.reimer@qaware.de
@LeanderReimer
2
Mario-Leander Reimer
Managing Director | CTO
@LeanderReimer
#cloudnativenerd #qaware
#gernperDude
Agenda
QAware | 3
QAware | 3
QAware | 3
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
Choose your framework and language
ⓘ Start presenting to display the poll results on this slide.
qaware/from-rest-to-grpc
“One cannot not communicate.”
- Paul Watzlawick
A Quick History Lesson on Inter Process Communication (IPC)
QAware | 7
REST
2000
by Roy T.
Fielding
RPC
14.01.1976
RFC 707
RPC
Oct 1983
Birrel und
Nielson
DCOM
18.09.1996
Win95
HTTP/1.0
Mai 1996
RFC 1945
CORBA 1.0
Oct 1991
CORBA 2.0
August 1996
HTTP/1.1
Juni 1999
RFC 2616
CORBA 2.3
Juni 1999
Java RMI
Feb 1997
JDK 1.1
XML-RPC
1998
SOAP 1.2
2003
CORBA 3.0
July 2002
RESTful
Applications
2014 (?)
HTTP/2.0
Mai 2015
RFC 7540
gRPC 1.0
Aug 2016
Agenda
QAware | 8
QAware | 8
QAware | 8
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
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
REST APIs
GET /api/beers
POST /api/beers
GET /api/beers/{asin}
PUT /api/beers/{asin}
DELETE /api/beers/{asin}
„Pretty URLs returning JSON“
— @hhariri
Nouns
Verbs
Request
Response
Richardson REST Maturity Model
QAware | 10
https://martinfowler.com/articles/richardsonMaturityModel.html
POST /bookingService HTTP/1.1
[various other headers]
<makeBookingRequest date="2010-01-04" persons="2"/>
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]
QAware | 11
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
The 8 Fallacies of Distributed Computing
There is no Readability in ISO 25010!
QAware | 12
Software Product
Quality
(ISO 25010)
● Modularity
● Reusability
● Analysability
● Modifiability
● Testability
Maintainability
● Confidentiality
● Integrity
● Non-repudiation
● Authenticity
● Accountability
Security
● Adaptability
● Installability
● Replaceability
Portability
● Co-existence
● Interoperability
Compatibility
● Maturity
● Availability
● Fault Tolerance
● Recoverability
Reliability
● Time Behaviour
● Resource Utilization
● Capacity
Efficiency
● Completeness
● Correctness
● Appropriateness
Functional Suitability
● Operability
● Learnability
● UI Aesthetics
● Accessibility
Usability
Protocol Buffers are a language-neutral, platform-neutral extensible
mechanism for serializing structured data.
QAware | 13
■ https://developers.google.com/protocol-buffers
■ Like XML or JSON - just smaller, faster and easier!
■ Google Protobuf uses an efficient binary format to serialize data structures.
■ An Interface Definition Language (IDL) is used to define data structures and message payloads. Many primitive types,
enums, maps, arrays, nested types.
■ Protocol Buffers supports code generation for Java, Python, Objective-C, C++, Kotlin, Dart, Go, Ruby und C#.
■ Protobuf supports evolution as well as extension of schemas. Backwards and forwards compatibility are supported:
– you must not change the tag numbers of any existing fields.
– you may delete fields.
– you may add new fields but you must use fresh tag numbers (i.e. tag numbers that were never used in this
protocol buffer, not even by deleted fields).
syntax = "proto3";
option java_package = "hands.on.grpc";
option java_outer_classname = "BeerProtos";
package beer;
message Beer {
string asin = 1;
string name = 2;
string brand = 3;
string country = 4;
float alcohol = 5;
enum BeerType{
IndianPaleAle = 0;
SessionIpa = 1;
Lager = 2;
}
BeerType type = 6;
}
// Protobuf marshalling
protoBeer = BeerProtos.Beer.newBuilder()
.setAsin("B079V9ZDNY")
.setName("Drunken Sailor")
.build();
byte[] bytes = protoBeer.toByteArray();
// Protobuf unmarshalling
protoBeer = BeerProtos.Beer.parseFrom(bytes);
$ ./gradlew generateProto
$ protoc -I=$SRC_DIR --java_out=$DST_DIR $SRC_DIR/beer.proto
JSON vs Protobuf Performance
QAware | 15
■ 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 requests on a compressed environment, the difference was even bigger. Protobuf performed 6 times faster, taking
only 25ms to handle requests that took 150ms on a JSON format.
https://auth0.com/blog/beating-json-performance-with-protobuf/
https://blog.qaware.de/posts/binary-data-format-comparison/
Disclaimer: please perform your own benchmarks for your specific use case!
Agenda
QAware | 16
QAware | 16
QAware | 16
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
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 Protocol Buffers as efficient binary payload format
■ Support various load balancing options: proxy, client-side and look-aside balancing
■ Flexible support for tracing, health checks and authentication
■ Client and server code can be generated from the IDL easily for several languages
– https://github.com/grpc/grpc-go
– https://buf.build
■ gRPC is a CNCF incubating project
QAware | 17
syntax = "proto3";
option java_package = "hands.on.grpc";
option java_outer_classname = "BeerProtos";
import "google/protobuf/empty.proto";
package beer;
service BeerService {
rpc AllBeers (google.protobuf.Empty) returns (GetBeersResponse) {}
rpc GetBeer (GetBeerRequest) returns (GetBeerResponse) {}
rpc CreateBeer (CreateBeerRequest) returns (google.protobuf.Empty) {}
rpc UpdateBeer (UpdateBeerRequest) returns (google.protobuf.Empty) {}
rpc DeleteBeer (DeleteBeerRequest) returns (google.protobuf.Empty) {}
}
// more Protobuf message definitions ...
Agenda
QAware | 19
QAware | 19
QAware | 19
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
The 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/
■ 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
QAware | 20
import "google/protobuf/empty.proto";
import "google/api/annotations.proto";
service BeerService {
rpc AllBeers (google.protobuf.Empty) returns (GetBeersResponse) {
option (google.api.http) = { get: "/api/beers" };
}
rpc GetBeer (GetBeerRequest) returns (GetBeerResponse) {
option (google.api.http) = {
get: "/api/beers/{asin}"
response_body: "beer"
};
}
rpc CreateBeer (CreateBeerRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/api/beers"
body: "*"
};
}
// more definitions …
}
Map gRPC call to GET request path
Map {asin} path param to request
Use beer field as response body
Map POST body to request
North-South
communication
with REST
East-West
communication
with gRPC
N
S
E
W
Ingress
Egress
We did it again!
1. Platz der besten Arbeitgeber in
der Branche IKT
(101-250 Mitarbeitende)
qaware.de
QAware GmbH
Aschauer Straße 32
81549 München
Tel. +49 89 232315-0
info@qaware.de
twitter.com/qaware
linkedin.com/company/qaware-gmbh
xing.com/companies/qawaregmbh
slideshare.net/qaware
github.com/qaware
Meine Kontaktdaten ...

More Related Content

Similar to REST in Peace. Long live gRPC! @ Codineers

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
 
CloudLand 2023: Rock, Paper, Scissors Cloud Competition - Go vs. Java
CloudLand 2023: Rock, Paper, Scissors Cloud Competition - Go vs. JavaCloudLand 2023: Rock, Paper, Scissors Cloud Competition - Go vs. Java
CloudLand 2023: Rock, Paper, Scissors Cloud Competition - Go vs. Java
Jan Stamer
 
gRPC or Rest, why not both?
gRPC or Rest, why not both?gRPC or Rest, why not both?
gRPC or Rest, why not both?
Mohammad Murad
 
(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems
sosorry
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
John Staveley
 
Solu
SoluSolu
Cloud Native API Design and Management
Cloud Native API Design and ManagementCloud Native API Design and Management
Cloud Native API Design and Management
AllBits BVBA (freelancer)
 
Get your teeth into Plack
Get your teeth into PlackGet your teeth into Plack
Get your teeth into Plack
Workhorse Computing
 
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps WayDevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
smalltown
 
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays
 
.NET Core Today and Tomorrow
.NET Core Today and Tomorrow.NET Core Today and Tomorrow
.NET Core Today and Tomorrow
Jon Galloway
 
Kernel load-balancing for Docker containers using IPVS
Kernel load-balancing for Docker containers using IPVSKernel load-balancing for Docker containers using IPVS
Kernel load-balancing for Docker containers using IPVS
Docker, Inc.
 
Microservices summit talk 1/31
Microservices summit talk   1/31Microservices summit talk   1/31
Microservices summit talk 1/31
Varun Talwar
 
Docker In Bank Unrated
Docker In Bank UnratedDocker In Bank Unrated
Docker In Bank Unrated
Aleksandr Tarasov
 
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, GoogleBringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Ambassador Labs
 
Into The Box 2018 Ortus Keynote
Into The Box 2018 Ortus KeynoteInto The Box 2018 Ortus Keynote
Into The Box 2018 Ortus Keynote
Ortus Solutions, Corp
 
HOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVM
HOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVMHOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVM
HOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVM
Owais Zahid
 
Implementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCImplementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPC
Tim Burks
 
Akka gRPC quick-guide
Akka gRPC quick-guideAkka gRPC quick-guide
Akka gRPC quick-guide
Knoldus Inc.
 
Akka gRPC quick-guide
Akka gRPC quick-guideAkka gRPC quick-guide
Akka gRPC quick-guide
Knoldus Inc.
 

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

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}
 
CloudLand 2023: Rock, Paper, Scissors Cloud Competition - Go vs. Java
CloudLand 2023: Rock, Paper, Scissors Cloud Competition - Go vs. JavaCloudLand 2023: Rock, Paper, Scissors Cloud Competition - Go vs. Java
CloudLand 2023: Rock, Paper, Scissors Cloud Competition - Go vs. Java
 
gRPC or Rest, why not both?
gRPC or Rest, why not both?gRPC or Rest, why not both?
gRPC or Rest, why not both?
 
(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Solu
SoluSolu
Solu
 
Cloud Native API Design and Management
Cloud Native API Design and ManagementCloud Native API Design and Management
Cloud Native API Design and Management
 
Get your teeth into Plack
Get your teeth into PlackGet your teeth into Plack
Get your teeth into Plack
 
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps WayDevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
 
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
 
.NET Core Today and Tomorrow
.NET Core Today and Tomorrow.NET Core Today and Tomorrow
.NET Core Today and Tomorrow
 
Kernel load-balancing for Docker containers using IPVS
Kernel load-balancing for Docker containers using IPVSKernel load-balancing for Docker containers using IPVS
Kernel load-balancing for Docker containers using IPVS
 
Microservices summit talk 1/31
Microservices summit talk   1/31Microservices summit talk   1/31
Microservices summit talk 1/31
 
Docker In Bank Unrated
Docker In Bank UnratedDocker In Bank Unrated
Docker In Bank Unrated
 
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, GoogleBringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
 
Into The Box 2018 Ortus Keynote
Into The Box 2018 Ortus KeynoteInto The Box 2018 Ortus Keynote
Into The Box 2018 Ortus Keynote
 
HOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVM
HOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVMHOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVM
HOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVM
 
Implementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCImplementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPC
 
Akka gRPC quick-guide
Akka gRPC quick-guideAkka gRPC quick-guide
Akka gRPC quick-guide
 
Akka gRPC quick-guide
Akka gRPC quick-guideAkka gRPC quick-guide
Akka gRPC quick-guide
 

More from 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
 
Per Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API GatewaysPer Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API Gateways
QAware GmbH
 

More from QAware GmbH (20)

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.
 
Per Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API GatewaysPer Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API Gateways
 

Recently uploaded

STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
sameer shah
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
nuttdpt
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Aggregage
 
State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
kuntobimo2016
 
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdfEnhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
GetInData
 
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
74nqk8xf
 
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
zsjl4mimo
 
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
mzpolocfi
 
Natural Language Processing (NLP), RAG and its applications .pptx
Natural Language Processing (NLP), RAG and its applications .pptxNatural Language Processing (NLP), RAG and its applications .pptx
Natural Language Processing (NLP), RAG and its applications .pptx
fkyes25
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
ahzuo
 
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
v7oacc3l
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
vikram sood
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
Sm321
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
Roger Valdez
 
Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......
Sachin Paul
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
Social Samosa
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
aqzctr7x
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 

Recently uploaded (20)

STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
 
State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
 
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdfEnhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
 
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
 
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
 
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
 
Natural Language Processing (NLP), RAG and its applications .pptx
Natural Language Processing (NLP), RAG and its applications .pptxNatural Language Processing (NLP), RAG and its applications .pptx
Natural Language Processing (NLP), RAG and its applications .pptx
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
 
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
 
Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 

REST in Peace. Long live gRPC! @ Codineers

  • 1. qaware.de REST in Peace. Long live gRPC! Codineers Rosenheim Mario-Leander Reimer mario-leander.reimer@qaware.de @LeanderReimer
  • 2. 2 Mario-Leander Reimer Managing Director | CTO @LeanderReimer #cloudnativenerd #qaware #gernperDude
  • 3. Agenda QAware | 3 QAware | 3 QAware | 3 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. Choose your framework and language ⓘ Start presenting to display the poll results on this slide.
  • 6. “One cannot not communicate.” - Paul Watzlawick
  • 7. A Quick History Lesson on Inter Process Communication (IPC) QAware | 7 REST 2000 by Roy T. Fielding RPC 14.01.1976 RFC 707 RPC Oct 1983 Birrel und Nielson DCOM 18.09.1996 Win95 HTTP/1.0 Mai 1996 RFC 1945 CORBA 1.0 Oct 1991 CORBA 2.0 August 1996 HTTP/1.1 Juni 1999 RFC 2616 CORBA 2.3 Juni 1999 Java RMI Feb 1997 JDK 1.1 XML-RPC 1998 SOAP 1.2 2003 CORBA 3.0 July 2002 RESTful Applications 2014 (?) HTTP/2.0 Mai 2015 RFC 7540 gRPC 1.0 Aug 2016
  • 8. Agenda QAware | 8 QAware | 8 QAware | 8 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
  • 9. 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 REST APIs GET /api/beers POST /api/beers GET /api/beers/{asin} PUT /api/beers/{asin} DELETE /api/beers/{asin} „Pretty URLs returning JSON“ — @hhariri Nouns Verbs Request Response
  • 10. Richardson REST Maturity Model QAware | 10 https://martinfowler.com/articles/richardsonMaturityModel.html POST /bookingService HTTP/1.1 [various other headers] <makeBookingRequest date="2010-01-04" persons="2"/> 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]
  • 11. QAware | 11 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 The 8 Fallacies of Distributed Computing
  • 12. There is no Readability in ISO 25010! QAware | 12 Software Product Quality (ISO 25010) ● Modularity ● Reusability ● Analysability ● Modifiability ● Testability Maintainability ● Confidentiality ● Integrity ● Non-repudiation ● Authenticity ● Accountability Security ● Adaptability ● Installability ● Replaceability Portability ● Co-existence ● Interoperability Compatibility ● Maturity ● Availability ● Fault Tolerance ● Recoverability Reliability ● Time Behaviour ● Resource Utilization ● Capacity Efficiency ● Completeness ● Correctness ● Appropriateness Functional Suitability ● Operability ● Learnability ● UI Aesthetics ● Accessibility Usability
  • 13. Protocol Buffers are a language-neutral, platform-neutral extensible mechanism for serializing structured data. QAware | 13 ■ https://developers.google.com/protocol-buffers ■ Like XML or JSON - just smaller, faster and easier! ■ Google Protobuf uses an efficient binary format to serialize data structures. ■ An Interface Definition Language (IDL) is used to define data structures and message payloads. Many primitive types, enums, maps, arrays, nested types. ■ Protocol Buffers supports code generation for Java, Python, Objective-C, C++, Kotlin, Dart, Go, Ruby und C#. ■ Protobuf supports evolution as well as extension of schemas. Backwards and forwards compatibility are supported: – you must not change the tag numbers of any existing fields. – you may delete fields. – you may add new fields but you must use fresh tag numbers (i.e. tag numbers that were never used in this protocol buffer, not even by deleted fields).
  • 14. syntax = "proto3"; option java_package = "hands.on.grpc"; option java_outer_classname = "BeerProtos"; package beer; message Beer { string asin = 1; string name = 2; string brand = 3; string country = 4; float alcohol = 5; enum BeerType{ IndianPaleAle = 0; SessionIpa = 1; Lager = 2; } BeerType type = 6; } // Protobuf marshalling protoBeer = BeerProtos.Beer.newBuilder() .setAsin("B079V9ZDNY") .setName("Drunken Sailor") .build(); byte[] bytes = protoBeer.toByteArray(); // Protobuf unmarshalling protoBeer = BeerProtos.Beer.parseFrom(bytes); $ ./gradlew generateProto $ protoc -I=$SRC_DIR --java_out=$DST_DIR $SRC_DIR/beer.proto
  • 15. JSON vs Protobuf Performance QAware | 15 ■ 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 requests on a compressed environment, the difference was even bigger. Protobuf performed 6 times faster, taking only 25ms to handle requests that took 150ms on a JSON format. https://auth0.com/blog/beating-json-performance-with-protobuf/ https://blog.qaware.de/posts/binary-data-format-comparison/ Disclaimer: please perform your own benchmarks for your specific use case!
  • 16. Agenda QAware | 16 QAware | 16 QAware | 16 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
  • 17. 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 Protocol Buffers as efficient binary payload format ■ Support various load balancing options: proxy, client-side and look-aside balancing ■ Flexible support for tracing, health checks and authentication ■ Client and server code can be generated from the IDL easily for several languages – https://github.com/grpc/grpc-go – https://buf.build ■ gRPC is a CNCF incubating project QAware | 17
  • 18. syntax = "proto3"; option java_package = "hands.on.grpc"; option java_outer_classname = "BeerProtos"; import "google/protobuf/empty.proto"; package beer; service BeerService { rpc AllBeers (google.protobuf.Empty) returns (GetBeersResponse) {} rpc GetBeer (GetBeerRequest) returns (GetBeerResponse) {} rpc CreateBeer (CreateBeerRequest) returns (google.protobuf.Empty) {} rpc UpdateBeer (UpdateBeerRequest) returns (google.protobuf.Empty) {} rpc DeleteBeer (DeleteBeerRequest) returns (google.protobuf.Empty) {} } // more Protobuf message definitions ...
  • 19. Agenda QAware | 19 QAware | 19 QAware | 19 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
  • 20. The 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/ ■ 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 QAware | 20
  • 21. import "google/protobuf/empty.proto"; import "google/api/annotations.proto"; service BeerService { rpc AllBeers (google.protobuf.Empty) returns (GetBeersResponse) { option (google.api.http) = { get: "/api/beers" }; } rpc GetBeer (GetBeerRequest) returns (GetBeerResponse) { option (google.api.http) = { get: "/api/beers/{asin}" response_body: "beer" }; } rpc CreateBeer (CreateBeerRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/api/beers" body: "*" }; } // more definitions … } Map gRPC call to GET request path Map {asin} path param to request Use beer field as response body Map POST body to request
  • 23. We did it again! 1. Platz der besten Arbeitgeber in der Branche IKT (101-250 Mitarbeitende)
  • 24. qaware.de QAware GmbH Aschauer Straße 32 81549 München Tel. +49 89 232315-0 info@qaware.de twitter.com/qaware linkedin.com/company/qaware-gmbh xing.com/companies/qawaregmbh slideshare.net/qaware github.com/qaware Meine Kontaktdaten ...

Editor's Notes

  1. Professional Details. 30 Jahre Software Bau. 15 Jahre QAware. 6 Jahrgänge SQS Vorlesung als Gastdozent. Wir beschäftigen uns mit Cloud Migration seit mehreren Jahren. Allianz. Telekom. BMW. … Cloud-native Neubau.
  2. 📣 This is Slido interaction slide, please don't delete it. ✅ Click on 'Present with Slido' and the poll will launch automatically when you get to this slide.
  3. 1994 it was 7 1997 it was 8