GraphQL, gRPC or REST? Resolving the API Developer's Dilemma - Rob Crowley

  Рет қаралды 125,050

NDC Conferences

NDC Conferences

4 жыл бұрын

GraphQL, gRPC, REST and WebHooks are among a bewildering array of technologies and architectural styles that are available to API developers today. Presented with such myriad options, how can we be confident of making an appropriate decision for the problem at hand? In search of guidance, developers often turn to online communities. This can exacerbate the problem as discussions about API styles often descend into statements about the superiority of one approach over another being presented as universal truths. Such comments invariably earn emotive rebuttals that also lack sufficient nuance. The result of such exchanges is increased confusion and uncertainty. Join me on a tour of these API styles where we will cut through this noise, demonstrate where each style shines (plus where they don't!) and ultimately resolve this dilemma of choice.
In this session we'll take an in-depth look at API design; the best practices that have evolved; the game changing supporting technologies that are now available including HTTP/2; and most importantly what you need to do to deliver a world class developer experience:
How to determine the suitability of an API style for your application context. Don't be a victim of technology hype!
What is required to support graceful evolution of the API contract including the potential implications of both Hyrum's Law and the Law of Implicit Interfaces
Understand the supporting toolchains and technologies that dovetail with each API style.
The importance of treating your API as a product with an unwavering focus on improving the ease of consumption for your clients.
By the end of the session, you will not only understand the concepts underpinning these various API styles but also have the knowledge to put them into practice. If you want to take to your API design expertise to the next level, then this is the session for you. See you there!
Check out more of our talks, courses, and conferences in the following links:
ndcconferences.com/
ndc-london.com/

Пікірлер: 101
@MartinThoma
@MartinThoma 4 жыл бұрын
1:02 Start with Agenda 2:40 About the speaker RobDCrowley 8:18 API Timeline 18:13 REST vs GraphQL 19:29 GraphQL = RDA + RPC 19:55: gRPC = HTTP/2 + Protobuf 21:48: REST is a state-machine over HTTP 27:48 GraphQL breaks caching - client-side chaching, server-side caching 30:58 Authentication 33:09 Caching summary 33:50 "REST APIs are inefficient" 35:34 Over/Underfetching 40:52 Performance 41:52: "GraphQL elimits the need for API versioning" 48:00 Contract First
@AnotherAvaibleName
@AnotherAvaibleName 3 жыл бұрын
thanks a lot
@gatsbylee2773
@gatsbylee2773 Жыл бұрын
Thx!!
@drmangrum
@drmangrum 4 жыл бұрын
The problem is too many developers latch on to the "great new thing" thinking it's better to what came before it just because it's new. Just because a technology is new doesn't mean the old technologies are irrelevant. New technologies are just new tools in the toolbox. Use what's best for your situation.
@dealloc
@dealloc 4 жыл бұрын
Sometimes they're old tools in a new toolbox :-)
@fullkickproductions7245
@fullkickproductions7245 2 жыл бұрын
See LISP as an example! One of the oldest high level languages, and certainly one of the finest!
@1anre
@1anre Жыл бұрын
@@dealloc *shiny new toolbox
@1anre
@1anre Жыл бұрын
@@fullkickproductions7245 LISP has been reskinned in what new language now?
@re1konn
@re1konn Жыл бұрын
@@milfex-lostex3984 doom emacs :p Hi
@rauru8570
@rauru8570 4 жыл бұрын
Me coming here: ok I need to learn more abour GraphQL Me coming out: ok I need to learn more HTTP2 and find out what the heck is gRPC
@shakambarix
@shakambarix 4 жыл бұрын
Lol exactly
@colinjohnson5515
@colinjohnson5515 4 жыл бұрын
Docs aren’t the greatest but for internal apis it’s pretty kickass
@PaulSebastianM
@PaulSebastianM 4 жыл бұрын
...or RPC in general, in fact. It should have never become more complicated than the basic concept of Remote Procedure Calls...
@mitchthepower
@mitchthepower 3 жыл бұрын
I think you might have learned enough about simic... ;-)
@rauru8570
@rauru8570 3 жыл бұрын
@@mitchthepower Our progress is measured in heartbeats
@chandragie
@chandragie Жыл бұрын
It's 2023. And this is still a brilliant talk!
@scottamolinari
@scottamolinari 4 жыл бұрын
I always thought "cache" was spoken like "cash". Is it not?
@AkosSzalay1988
@AkosSzalay1988 4 жыл бұрын
it varies between different accents
@arwahsapi
@arwahsapi 4 жыл бұрын
Australian: kay-sh
@keja0
@keja0 4 жыл бұрын
@@BDnevernind Specifikayshing =))
@danielschmider5069
@danielschmider5069 4 жыл бұрын
he also pronounces "leverage" as "leaverage". English is flexible
@colinjohnson5515
@colinjohnson5515 4 жыл бұрын
I speak ‘Merican(Texican) and cache and cash are pronounced the same.
@onur7183
@onur7183 3 жыл бұрын
This presentation was amazing! I am going to start with my bachelor thesis soon about graphql and rest. Are there any good book recommendations out there? Let me know 😎
@seff7183
@seff7183 Жыл бұрын
love seeing this nuanced approach. twitter takes constantly make me feel like making any decision is the wrong decision because there's some expert out there flinging witty puns around shitting on my tech stack.
@jamesmccabe2286
@jamesmccabe2286 3 жыл бұрын
Great talk! A lot of very useful stuff and it is really thoughts provoking.
@KamilSkalski
@KamilSkalski 4 жыл бұрын
You can also use grpc-js, which is purely-JS grpc client (think are also wrapping up server implementation, for use in node I guess), so browser can easily become one of many polyglot consumers of grpc based API
@jamesmccabe2286
@jamesmccabe2286 3 жыл бұрын
1:02 Start with Agenda 2:40 About the speaker RobDCrowley 8:18 API Timeline 18:13 REST vs GraphQL 19:29 GraphQL = RDA + RPC 19:55: gRPC = HTTP/2 + Protobuf 21:48: REST is a state-machine over HTTP 27:48 GraphQL breaks caching - client-side chaching, server-side caching 30:58 Authentication 33:09 Caching summary 33:50 "REST APIs are inefficient" 35:34 Over/Underfetching 40:52 Performance 41:52: "GraphQL elimits the need for API versioning" 48:00 Contract First
@ArquimedesOfficial
@ArquimedesOfficial Жыл бұрын
From my experience: RPC is good when you need execute actions or events -> eg. An authoritative game server; A "near real-time" system. Use REST when you need expose data or datasets -> eg. Data from a "products" table for a frontend ecommerce; Statistical data for analysis like Covid19 datasets... GraphQL is good when you need specific fields from different datasets/tables, conceptually very similar to "views" in databases -> eg. Personalized recommendation systems like those on KZfaq, Netflix, Amazon store... But the most important thing: All it depends of the bussiness needs, not your personal needs!
@archmad
@archmad Жыл бұрын
not real-time. it is event-driven
@ArquimedesOfficial
@ArquimedesOfficial Жыл бұрын
@@archmad Right.
@thorick590
@thorick590 4 жыл бұрын
Totally agree with the sentiment. Each architecture addresses a certain type of problem. You choose the one that best fits your circumstance. Good luck with message type polymorphism if you try to change your SOAP service to REST using JSON as the message format, for example. For the vast majority of consumer facing web/mobile apps this kind of capability is completely irrelevant so SOAP is complicated to use and a complete waste of computing resources. Like owning a McLaren if all you want is a car to get around town to go grocery shopping. You're far better off with that Toyota Yaris.
@jacquesduplessis6175
@jacquesduplessis6175 3 жыл бұрын
This is a good talk. Nicely balanced.
@parapadirapa
@parapadirapa 3 жыл бұрын
Anyone has a couple of books on this subject, comparing the pros and cons of the different API styles and mentioning practical applications of each style? Thanks in advance
@user-yb4jd5jv2f
@user-yb4jd5jv2f Жыл бұрын
Mature view on using different API approaches.
@Christobanistan
@Christobanistan 3 жыл бұрын
Note that Protobuf can be replaced in gRPC. If both ends were .Net, for example, you could not serialize at all but blit out the in-memory binary representation, which is much faster.
@falconeagle3655
@falconeagle3655 4 жыл бұрын
Good video.
@Thrated
@Thrated 3 жыл бұрын
First part of the talk is basically a repetition of everything that's said in the "REST vs. GraphQL: Critical Look" talk by Zdenek Nemec kzfaq.info/get/bejne/r7KWY9V6xrjYgpc.html (which is actually referenced in 18:01). But they complement each other nicely.
@stevepascoe
@stevepascoe 4 жыл бұрын
Finally some common sense on this topic ❤️
@IngoBing
@IngoBing 4 жыл бұрын
Totally agree
@sariksiddiqui6059
@sariksiddiqui6059 3 жыл бұрын
Server push is being removed as of now from chrome,given how less it's being used
@GodOfMacro
@GodOfMacro 4 жыл бұрын
what about datomic
@MaheshKumar-lq1xm
@MaheshKumar-lq1xm 3 жыл бұрын
Before even hearing out I can tell the answer "It depends" Then why to compare ?
@DionV
@DionV 2 жыл бұрын
Why compare? Because there is always someone new to the tech who is asking this exact question. Getting a nice summary of the pros and cons of each is very helpful.
@RogerValor
@RogerValor 4 жыл бұрын
SOAP failed because it was trying to create self building protocols serving project management instead of software development. All comparisons to REST (and Xml-Rpc/Json-Rpc) being embraced again is quite hard to compare to it. So I would not listen to such hyped articles anyway. Whenever people want to create programs without understanding how to code try to create protocols, it will just fail. So this talk greatly shows, how each more simple API strategy has it's strengths and weaknesses.
@colinjohnson5515
@colinjohnson5515 4 жыл бұрын
Roger Valor by the time cross platform SOAP became popular in my neck of the woods, the modern web was just taking off and REST made sense to web devs as well as backend server guys.
@theworld5937
@theworld5937 2 жыл бұрын
What beautiful slides
@keja0
@keja0 4 жыл бұрын
This was a great presentation, but the kayshing destroyed it. I literally had to take a break to recover. *_*
@YBWang-pi9qq
@YBWang-pi9qq 3 жыл бұрын
51:21 Sample Scenarios Typical Use Cases of REST/GraghQL/gRPC
@rafaelfreitas7080
@rafaelfreitas7080 4 жыл бұрын
54:08 I just have to say the name Native Mobile BFF sounds absolutely hilarious
@alexclark6777
@alexclark6777 4 жыл бұрын
Okay but I'm still confused. Is this guy Dutch or Irish?
@les2997
@les2997 4 жыл бұрын
Can you abort a GraphQL query?
@rumble1925
@rumble1925 3 жыл бұрын
I think so. It's a regular network call so it should be possible to handle cancellations
@yegorzakharov8514
@yegorzakharov8514 Жыл бұрын
I had involuntary ticks everytime he said "Kayshh" when reading "cache" xD
@moveaxebx
@moveaxebx 4 жыл бұрын
How is GraphQL API? It's a query interface
@archmad
@archmad 2 жыл бұрын
these guys didnt know what will happen next month
@MrChannell
@MrChannell 4 жыл бұрын
Cache is a French word that is pronounced Cash in Englishing (as in "Cash of Gold", rather than "We accept Cash")... maybe it's SQL (S-Q-L or Sequal), difficult to listen to someone who can't pronounce the word, but the summary was OK: GraphQL for query, gRPC for RPC
@edgeeffect
@edgeeffect Жыл бұрын
I've assumed that this recent trend towards cay-she derives from American-English but I might be hurling blame at the easy victim there. ;) I had to stop listening once he started in that direction but then again, I'm incapable of controlling my aversion to "sequel" so I'm obviously not the most pronunciation-tolerant person in the world.
@scottamolinari
@scottamolinari 4 жыл бұрын
One other thing. It is always missed, because these discussions are targeted at GraphQL as an API, but GraphQL clients also do one other thing amazingly well, which helps developer efficiency. They allow for the components (as in SFCs in React/ Vue, etc.) to be the masters of their own data. You can't do that easily with a REST client.
@thomasczthomash1859
@thomasczthomash1859 4 жыл бұрын
The client is a master of the data if someone is writing the GraphQL back end to supply that data, exactly the same as REST, it doesn't come for free. GraphQL is pointless.
@AB-fp8xo
@AB-fp8xo 4 жыл бұрын
If you use ODATA with you REST API, you can also specify properties you want and load all required related entities at once. It event goes further and allows you to sort and filter data - something you cannot do in GraphQL without implementing it yourself...
@scottamolinari
@scottamolinari 4 жыл бұрын
@@thomasczthomash1859 Sorry you see it that way. You are missing out on a lot.
@scottamolinari
@scottamolinari 4 жыл бұрын
@@AB-fp8xo Your missing the whole point. I see this quite often, people stuck in the REST paradigm. Oh well. I'll leave you with this. GraphQL wasn't built only for the data and state transfer between client and server. It was built for a better developer experience too, because a component's data/ state (also fetching/ mutating on the server) is local to itself. You can't do that with REST.
@nexxmex
@nexxmex 4 жыл бұрын
@@scottamolinari Just to be sure: honest question, what is REST for you? Many people think that REST is using HTTP verbs, but this is (surprise surprise) a plain HTTP API. If you do not utilize hyperlinks and dont allow clients to discover and traverse your object graph, you might as well be honest and not call the API a REST API. Sadly this is a very common misconception in the industry.
@jonchicoine
@jonchicoine 4 жыл бұрын
since when is "caching" pronounced as "Kay-shing"?
@youtube.com-handle
@youtube.com-handle 4 жыл бұрын
So, and let me get this correct, you failed to Cache in THIS Entire Demo, because its kayshing... dont be such a compiler.
@PaulSebastianM
@PaulSebastianM 4 жыл бұрын
@@youtube.com-handle 👌👍
@PaulSebastianM
@PaulSebastianM 4 жыл бұрын
Appli-kay-shin kay-shing. 😎
@bboy349833591
@bboy349833591 4 жыл бұрын
Since when is data pronounced as data. 🤪
@icodefor
@icodefor 4 жыл бұрын
Not going to lie, this hung me up to for the first 3 times he said it that way. But by the 6th time I got used to it.
@RH-of5cr
@RH-of5cr 3 жыл бұрын
Ksh-able
@TheVincent0268
@TheVincent0268 4 жыл бұрын
just use all of them. Hourses for courses
@thomasczthomash1859
@thomasczthomash1859 4 жыл бұрын
Horses 🐴
@TheVincent0268
@TheVincent0268 4 жыл бұрын
@@thomasczthomash1859 o yes, ha ha, what a silly mistake. I will leave it, otherwise readers won't understand your comment :)
@fr3ddyfr3sh
@fr3ddyfr3sh 3 жыл бұрын
Im still in in love with the power of wsdl (not it’s steep learning curve though). Grpc is really nice, super easy IDL. Never was a big fan of REST, because before openAPI it was a nightmare to do larger applications and doing refactorings. The hate for XML being noisy is 99% irrelevant, just use attributes instead of elements and you get the exact same noisiness like JSON. And XML supports comments, and you can describe your document’s structure with xsd. And that since it’s beginnings. Not a big fan of the namespaces for XML though, I just leave them away. They make sense for really special cases like xaml, html svg, webgl etc
@koronci
@koronci 3 жыл бұрын
you have different types of kayshing :D ..brainfreeze..wait what...whaaaat
@compartelo007
@compartelo007 4 жыл бұрын
podías hablar más rápido por favor?
@anonymousrulz
@anonymousrulz 3 жыл бұрын
00:32 gPRC! :o
@ArtemBayandin
@ArtemBayandin 4 жыл бұрын
thanks for the topic, but ... this is a duplicate of your video posted 3 months ago: kzfaq.info/get/bejne/gq-RmM6auZypmKc.html ... i got a bit anxious before reminded that i had already seen this video)) nevertheless, keep going) nice videos, have dozens in my lists.
@thomasczthomash1859
@thomasczthomash1859 4 жыл бұрын
GraphQL is definitely not the new REST. REST is still the king. Long live REST.
@BryonLape
@BryonLape 4 жыл бұрын
There are no new ideas.
@igelineau
@igelineau 2 жыл бұрын
is it NDC paying for bots in the comments ? very stange... I expect them on Crypto content, but not talks about API technologies!
@JTMoustache
@JTMoustache 2 жыл бұрын
I desperately need to blow my nose
@kehaarable
@kehaarable 4 жыл бұрын
omg, it was all fine until he tried to pronounce "caching" - he sounds Irish - why can't he pronounce that word?
@MrNorthCat
@MrNorthCat 4 жыл бұрын
Great talk! A lot of very useful stuff and it is really thoughts provoking.
@samanthaferguson6018
@samanthaferguson6018 3 жыл бұрын
This is a good talk. Nicely balanced.
@igelineau
@igelineau 2 жыл бұрын
@@samanthaferguson6018 are you a bot?
@samanthaferguson6018
@samanthaferguson6018 3 жыл бұрын
Finally some common sense on this topic ❤️
@igelineau
@igelineau 2 жыл бұрын
bot!!!
Turbocharged: Writing High-Performance C# and .NET Code - Steve Gordon
1:01:12
Why I Don’t Use GraphQL Anymore
16:29
Harry Wolff
Рет қаралды 69 М.
World’s Deadliest Obstacle Course!
28:25
MrBeast
Рет қаралды 84 МЛН
La revancha 😱
00:55
Juan De Dios Pantoja 2
Рет қаралды 62 МЛН
🍟Best French Fries Homemade #cooking #shorts
00:42
BANKII
Рет қаралды 65 МЛН
DELETE TOXICITY = 5 LEGENDARY STARR DROPS!
02:20
Brawl Stars
Рет қаралды 18 МЛН
Comparing web API types: SOAP, REST, GraphQL and RPC
15:19
AltexSoft
Рет қаралды 91 М.
Ctrl-Alt-Del: Learning to Love Legacy Code - Dylan Beattie
56:47
NDC Conferences
Рет қаралды 131 М.
REST vs. GraphQL: Critical Look
33:06
Nordic APIs
Рет қаралды 60 М.
War of the APIs - REST vs GraphQL vs gRPC by Memi Lavi
40:45
When RESTful architecture isn't enough...
21:02
Dreams of Code
Рет қаралды 242 М.
From WCF to gRPC - Mark Rendle
1:04:33
NDC Conferences
Рет қаралды 43 М.
Correcting Common Async/Await Mistakes in .NET - Brandon Minnick
1:00:11
NDC Conferences
Рет қаралды 166 М.
The Truth About GraphQL
12:06
Theo - t3․gg
Рет қаралды 93 М.
GraphQL: The Documentary
27:58
Honeypot
Рет қаралды 568 М.
5 НЕЛЕГАЛЬНЫХ гаджетов, за которые вас посадят
0:59
Кибер Андерсон
Рет қаралды 1,6 МЛН
Неразрушаемый смартфон
1:00
Status
Рет қаралды 1,2 МЛН
i like you subscriber ♥️♥️ #trending #iphone #apple #iphonefold
0:14
MacBook Air Японский Прикол!
0:42
Sergey Delaisy
Рет қаралды 534 М.