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
23
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
Modern data observability
posedio
PRO
0
6
Lost Jobs, Zombie Tasks and AirFlow Nightmares: A debugging Deep Dive
posedio
PRO
0
32
Designing Zero Trust Systems
posedio
PRO
0
24
Platform user's remorse
posedio
PRO
0
130
Go KonMari on your SQL
posedio
PRO
0
22
Rolling out digital receipts on GCP infrastructure
posedio
PRO
0
16
API First revisited - where did we take a left turn?
posedio
PRO
0
64
Solving Multi-Tenant Challenges: Apache Airflow and Cloud Composer in Action
posedio
PRO
0
57
Contract testing with Java
posedio
PRO
0
47
Other Decks in Programming
See All in Programming
How Android Uses Data Structures Behind The Scenes
l2hyunwoo
0
480
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
410
ユーザーも開発者も悩ませない TV アプリ開発 ~Compose の内部実装から学ぶフォーカス制御~
taked137
0
190
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
2.5k
Rancher と Terraform
fufuhu
2
550
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
610
楽して成果を出すためのセルフリソース管理
clipnote
0
190
アセットのコンパイルについて
ojun9
0
130
為你自己學 Python - 冷知識篇
eddie
1
350
print("Hello, World")
eddie
2
530
Testing Trophyは叫ばない
toms74209200
0
890
OSS開発者という働き方
andpad
5
1.7k
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.7k
A Tale of Four Properties
chriscoyier
160
23k
How GitHub (no longer) Works
holman
315
140k
Building Adaptive Systems
keathley
43
2.7k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Context Engineering - Making Every Token Count
addyosmani
3
59
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
810
Music & Morning Musume
bryan
46
6.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
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!