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
20
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
API First revisited - where did we take a left turn?
posedio
PRO
0
29
Solving Multi-Tenant Challenges: Apache Airflow and Cloud Composer in Action
posedio
PRO
0
18
Contract testing with Java
posedio
PRO
0
18
Flink in two nutshells
posedio
PRO
0
17
Taming the Codebase: Strategies for Refactoring Legacy Code
posedio
PRO
0
13
Access & Usage Policies and Enforcement: Challenges and Solutions
posedio
PRO
0
13
The Future of Data Sharing
posedio
PRO
0
54
Is your spring boot application in Kubernetes secure?
posedio
PRO
0
63
Zero trust architecture with Keycloak
posedio
PRO
0
190
Other Decks in Programming
See All in Programming
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.2k
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
2
130
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
960
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
200
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
2
430
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
820
nekko cloudにおけるProxmox VE利用事例
irumaru
3
460
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
200
fs2-io を試してたらバグを見つけて直した話
chencmd
0
240
快速入門可觀測性
blueswen
0
410
MCP with Cloudflare Workers
yusukebe
2
230
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
650
Featured
See All Featured
Designing for humans not robots
tammielis
250
25k
Typedesign – Prime Four
hannesfritz
40
2.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Become a Pro
speakerdeck
PRO
26
5k
Faster Mobile Websites
deanohume
305
30k
The World Runs on Bad Software
bkeepers
PRO
66
11k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Statistics for Hackers
jakevdp
796
220k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Into the Great Unknown - MozCon
thekraken
33
1.5k
The Cult of Friendly URLs
andyhume
78
6.1k
A designer walks into a library…
pauljervisheath
205
24k
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!