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
What is a platform?
posedio
PRO
0
46
Unsealing Vault
posedio
PRO
0
16
Modern data observability
posedio
PRO
0
16
Lost Jobs, Zombie Tasks and AirFlow Nightmares: A debugging Deep Dive
posedio
PRO
0
35
Designing Zero Trust Systems
posedio
PRO
0
29
Platform user's remorse
posedio
PRO
0
140
Go KonMari on your SQL
posedio
PRO
0
24
Rolling out digital receipts on GCP infrastructure
posedio
PRO
0
23
API First revisited - where did we take a left turn?
posedio
PRO
0
65
Other Decks in Programming
See All in Programming
AI駆動で0→1をやって見えた光と伸びしろ
passion0102
1
570
SwiftDataを使って10万件のデータを読み書きする
akidon0000
0
230
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
500
One Enishi After Another
snoozer05
PRO
0
130
Android16 Migration Stories ~Building a Pattern for Android OS upgrades~
reoandroider
0
130
他言語経験者が Golangci-lint を最初のコーディングメンターにした話 / How Golangci-lint Became My First Coding Mentor: A Story from a Polyglot Programmer
uma31
0
310
Writing Better Go: Lessons from 10 Code Reviews
konradreiche
0
3.2k
Claude CodeによるAI駆動開発の実践 〜そこから見えてきたこれからのプログラミング〜
iriikeita
0
310
タスクの特性や不確実性に応じた最適な作業スタイルの選択(ペアプロ・モブプロ・ソロプロ)と実践 / Optimal Work Style Selection: Pair, Mob, or Solo Programming.
honyanya
3
180
CSC509 Lecture 05
javiergs
PRO
0
300
その面倒な作業、「Dart」にやらせませんか? Flutter開発者のための業務効率化
yordgenome03
1
130
スキーマ駆動で、Zod OpenAPI Honoによる、API開発するために、Hono Takibiというライブラリを作っている
nakita628
0
250
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
115
20k
How GitHub (no longer) Works
holman
315
140k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
620
A Modern Web Designer's Workflow
chriscoyier
697
190k
Java REST API Framework Comparison - PWX 2021
mraible
34
8.9k
GraphQLとの向き合い方2022年版
quramy
49
14k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Bash Introduction
62gerente
615
210k
A designer walks into a library…
pauljervisheath
209
24k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
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!