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
16
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
27
Solving Multi-Tenant Challenges: Apache Airflow and Cloud Composer in Action
posedio
PRO
0
16
Contract testing with Java
posedio
PRO
0
12
Flink in two nutshells
posedio
PRO
0
15
Taming the Codebase: Strategies for Refactoring Legacy Code
posedio
PRO
0
11
Access & Usage Policies and Enforcement: Challenges and Solutions
posedio
PRO
0
11
The Future of Data Sharing
posedio
PRO
0
49
Is your spring boot application in Kubernetes secure?
posedio
PRO
0
58
Zero trust architecture with Keycloak
posedio
PRO
0
150
Other Decks in Programming
See All in Programming
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
370
Micro Frontends Unmasked Opportunities, Challenges, Alternatives
manfredsteyer
PRO
0
130
Outline View in SwiftUI
1024jp
1
350
イマのCSSでできる インタラクション最前線 + CSS最新情報
clockmaker
5
3.1k
イベント駆動で成長して委員会
happymana
1
340
初めてDefinitelyTypedにPRを出した話
syumai
0
440
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
180
Modular Monolith Monorepo ~シンプルさを保ちながらmonorepoのメリットを最大化する~
yuisakamoto
9
1.5k
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
740
Missing parts when designing and implementing Android UI
ericksli
0
230
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
3
1.2k
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
520
39k
GitHub's CSS Performance
jonrohan
1030
460k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Gamification - CAS2011
davidbonilla
80
5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
140
Statistics for Hackers
jakevdp
796
220k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Into the Great Unknown - MozCon
thekraken
32
1.5k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Code Review Best Practice
trishagee
64
17k
Practical Orchestrator
shlominoach
186
10k
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!