Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Choosing the Right Tool
Search
Posedio
PRO
February 12, 2024
Programming
0
21
Choosing the Right Tool
A Comparative Look at gRPC, REST an GraphQL
Posedio
PRO
February 12, 2024
Tweet
Share
More Decks by Posedio
See All by Posedio
Designing Zero Trust Systems
posedio
PRO
0
7
Platform user's remorse
posedio
PRO
0
99
Go KonMari on your SQL
posedio
PRO
0
16
Rolling out digital receipts on GCP infrastructure
posedio
PRO
0
10
API First revisited - where did we take a left turn?
posedio
PRO
0
53
Solving Multi-Tenant Challenges: Apache Airflow and Cloud Composer in Action
posedio
PRO
0
34
Contract testing with Java
posedio
PRO
0
32
Flink in two nutshells
posedio
PRO
0
27
Taming the Codebase: Strategies for Refactoring Legacy Code
posedio
PRO
0
28
Other Decks in Programming
See All in Programming
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
250
若手バックエンドエンジニアが Elasticsearch を使ってみた話
hott0mott0
1
100
Amazon Bedrockマルチエージェントコラボレーションを諦めてLangGraphに入門してみた
akihisaikeda
1
190
❄️ NixOS/nixpkgsにSATySFiサポートを実装する
momeemt
1
110
読まないコードリーディング術
hisaju
1
150
From the Wild into the Clouds - Laravel Meetup Talk
neverything
0
190
CDKを使ったPagerDuty連携インフラのテンプレート化
shibuya_shogo
0
130
高セキュリティ・高耐障害性・サブシステム化。そして2億円
tasukulab280
2
410
ML.NETで始める機械学習
ymd65536
0
260
Webフレームワークとともに利用するWeb components / JSConf.jp おかわり
spring_raining
1
160
Goで作るChrome Extensions / Fukuoka.go #21
n3xem
2
480
CloudRun, Spanner に対する負荷試験の反省と オブザーバビリティによるアプローチ
oyasumipants
1
210
Featured
See All Featured
Designing for humans not robots
tammielis
250
25k
Building Adaptive Systems
keathley
40
2.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7.1k
Producing Creativity
orderedlist
PRO
344
40k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
101
18k
The Cost Of JavaScript in 2023
addyosmani
47
7.5k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
590
Docker and Python
trallard
44
3.3k
Automating Front-end Workflow
addyosmani
1369
200k
What's in a price? How to price your products and services
michaelherold
244
12k
RailsConf 2023
tenderlove
29
1k
Transcript
None
Your guiding light to innovation
CHOOSING THE RIGHT TOOL: A COMPARATIVE LOOK AT GRPC, REST,
AND GRAPHQL JAVA MEETUP - VIENNA DAMJAN GJUROVSKI 21 May 2024
4 HI • Damjan Gjurovski • Dev and Ops J
• Written REST code for a long while, dabbled in GraphQL for some frontend apps and implemented (and debugged) gRPC in performance-critical applications
WHAT’S IN IT FOR ME 1. The sandbox 2. REST,
GraphQL, gRPC – what do the letters mean 3. Let’s compare them, but fairly 4.What should I use in my project?
THE SANDBOX 1
7 OUR TINY APP • Book rooms in a hotel
• Mental model • What would a database model look like • What would Java entities look like
REST, GRAPHQL, GRPC – WHAT DO THE LETTERS MEAN 2
9 REST • Representational state transfer • Resources on the
server • Identifiers • Representation over the wire • HTTP verbs to modify state
10 REST PROBLEMS • Misuse / verbs in URL •
Batch transactions • Partial data requests
11 GRAPHQL • Only request data as needed • Schema
is defined separately, and compatibility can be ensured/enforced
12 GRAPHQL PROBLEMS • Caching • Complex queries • Schema
evolution
13 GRPC • Binary protocol – super fast • Protobuf
schema is defined separately, and compatibility can be ensured/enforced • Nice features for scale
14 GRPC PROBLEMS • Remote procedure calls • Server to
server communication • Code generation / stubs • Debugging
LET'S COMPARE THEM, BUT FAIRLY 3
16 • Client – Server • Browser – Server •
API Client - Server • Server – Server • Microservices • Backend servers COMMUNICATION TYPES
17 • Lots of data • Only partially used data
• Streaming data • Little data • Data represents state DATA
18 • Security • Latency • Schema evolution NON-FUNCTIONAL REQUIREMENTS
19 HOW TO BUILD FAST ON TOP OF SLOW SYSTEMS
20 HOW TO BUILD FAST ON TOP OF SLOW SYSTEMS
WHAT SHOULD I USE IN MY PROJECT 4
22 THIS IS THE WAY • Use gRPC for critical,
complex projects • Use graphQL when you need to support multiple clients with different needs • When not sure use REST
23 WANT TO KEEP THE DISCUSSION GOING? MESSAGE ME ON
LINKEDIN!