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
15
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
The Future of Data Sharing
posedio
PRO
0
40
Is your spring boot application in Kubernetes secure?
posedio
PRO
0
50
Zero trust architecture with Keycloak
posedio
PRO
0
97
Site Reliability Engineering: Getting C-Level Support
posedio
PRO
0
12
Controlling Data in Gaia-X
posedio
PRO
0
13
The REWE Data Platform
posedio
PRO
0
31
Key Insights from Using Kafka in Large-Scale Projects
posedio
PRO
0
60
We tried to sell a cake for 1 Billion Euro... then build a data mesh
posedio
PRO
0
14
Handling round-the-clock availability
posedio
PRO
0
18
Other Decks in Programming
See All in Programming
CSC509 Lecture 03
javiergs
PRO
0
140
実践サーバーレスパフォーマンスチューニング ~その実力に迫る~ / Practical Serverless Performance Tuning ~A Close Look at its Power~
seike460
PRO
2
150
PHPを書く理由、PHPを書いていて良い理由 / Reasons to write PHP and why it is good to write PHP
seike460
PRO
5
470
ポケモンで考えるコミュニケーション / Communication Lessons from Pokémon
mackey0225
4
170
Real-time message handling and notifications with API Platform and Symfony
alli83
1
110
Introduce dRuby
ledsun
0
120
コードレビューと私の過去と未来
jxmtst
0
280
Vue :: Better Testing 2024
up1
1
400
UnJSで簡単に始めるCLIツール開発 / cli-tool-development-with-unjs
aoseyuu
2
310
Pythonによるイベントソーシングへの挑戦と現状に対する考察 / Challenging Event Sourcing with Python and Reflections on the Current State
nrslib
3
1.3k
現場から考えるソフトウェアエンジニアリングの価値と実験
nomuson
1
130
データマイグレーションの成功戦略~サービスリニューアルで失敗しないための実践ガイド~
tkzwtks
8
720
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.7k
Writing Fast Ruby
sferik
626
60k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
23k
Art, The Web, and Tiny UX
lynnandtonic
296
20k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
110
6.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
31
2.3k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.5k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Design by the Numbers
sachag
278
19k
Mobile First: as difficult as doing things right
swwweet
222
8.8k
Navigating Team Friction
lara
183
14k
Robots, Beer and Maslow
schacon
PRO
157
8.2k
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!