rest api : good for exposing crud operations rpc : good for exposing several actions Graphql: Good when need data filtering on client side.(Flexibility)
@dennycrane29382 жыл бұрын
"with rest and rpc the api often returns fields that the client doesn't use" -- this is true, however, modern rpc frameworks like grpc do have things like FieldMask which solves this problem.
@wololo16572 жыл бұрын
Thank you for creating this video. I was a bit confused about the use case for both RPC and GraphQL but now I understand the tradeoffs well enough to know when it's worth using one over the other. One thing I would've liked though, which maybe useful for future videos, is to have an example use case for each, that goes into detail for a simple application, which would illustrate tradeoffs potentially better.
@ambientcoder54622 жыл бұрын
That's some really useful feedback, I will keep that in mind for future videos! Thanks for the support!
@swainscheps2 жыл бұрын
really appreciate this. As others have noted...too many go straight to the bits and bytes and skip the practical considerations. Great video. Two thumbs up.
@maxxiao56513 жыл бұрын
Best IT explanation video watched ever! Clear and Precise! Love it!
@ambientcoder54623 жыл бұрын
Wow, thanks for the kind words!
@TomassoMd Жыл бұрын
Important aspect of RPC that was not mentioned: in general RPC leads to coupling of client and server, that is, implementation of server actions is reflection of what client (or particular implementation of client) needs. This limits flexibility and reusability. It is great for creating APIs that are going to be used closely with a particular product, but that limits potential future exposition of the API to other usages, like launching a public API for the product. Since the server API was designed around product needs (usually more high level actions and lacking granularity), moving to a different use case or opening up the API might be difficult to untangle.
@ankk983 жыл бұрын
Thank you for this series. Learnt a lot of important stuff that is not so easily available. Suggestion: please add some examples of each case, maybe you can use a tool like postman
@ambientcoder54623 жыл бұрын
I’m glad you found the series useful! Thanks for the suggestion, I’ll keep that in mind for future videos 👌
@sultanmuhammad5952 жыл бұрын
Thanks for such a good series. Its quite hard to find such series. Mostly are based on coding only and dont cover the theoretical part.
@ambientcoder54622 жыл бұрын
Glad you like them and thanks for the positive feedback!
@chiranjiveesaksham51733 жыл бұрын
Thanks for explaining in simple and easy way.
@ambientcoder54623 жыл бұрын
Happy to help 🙂
@thatgenzdev3 жыл бұрын
Best explanation I've seen so far.
@ambientcoder54623 жыл бұрын
Thanks for your kind words 🙂
@Fullflexno15 күн бұрын
Thank you for this. Cheers from norway!
@aworden3 жыл бұрын
Great explanation Thanks! And thanks for mentioning RPC APIs. They are the right solution 99% of the time in my experience.
@ambientcoder54623 жыл бұрын
Thanks for your support! And yes you’re absolutely right - RPC is a good fit in most cases.
@r0ck5663 жыл бұрын
But why the majority of companies are still using REST?
@blitzpark12503 жыл бұрын
@@r0ck566 I think it is 'cause rpc is built using http2 and many client+server architecture is on http/1.1
@nikthough31103 жыл бұрын
The way you explain is just simply golden. Subscribed and Liked.
@ambientcoder54623 жыл бұрын
Thanks for the kind words 🙂
@Gorlung Жыл бұрын
Why is for search in your REST example the PUT method being used and not the GET method?
@jeffreycui9933 Жыл бұрын
Thank you for the excellent video. But why use PUT for a search instead of using GET?
@dgillies5420 Жыл бұрын
6:05 I think mean, "You don't want to use _verbs_ ..." not "nouns"
@wishniks2 жыл бұрын
Nice session that provides overview of the various types of API. Separate videos detailing each of the types along with examples would be really helpful!
@PradipLamsal-s8m6 ай бұрын
Thank you very much. Saved me a lot of hassle.
@112_akmalmahardikanp85 ай бұрын
really appreciate this. this fit what i am searching for
@MsTheBiggest2 ай бұрын
Amazing overview
@josevalentinmoralesrobles94292 жыл бұрын
Great video, easy to understand and with a lot of useful information.
@mahdizarepoor89642 жыл бұрын
That was a neat video about them . I really enjoyed you explanation . Thanks
@sazidahmed30123 жыл бұрын
Nice Presentation with well explanation.
@ambientcoder54623 жыл бұрын
Thank you, I’m glad you enjoyed it :)
@sazidahmed30123 жыл бұрын
@@ambientcoder5462 You can also create a video on FAST api
@nuny-vega4 ай бұрын
Great video, thanks!
@soniablanche5672 Жыл бұрын
There's nothing stopping you from customizing the REST Api to get smaller payloads by using query params to tell the server what fields you want. /api/user/1?q=name,age for example would return name and age only.
@MichelJung Жыл бұрын
Yahoo's Elide implements this very well
@eugenpaval Жыл бұрын
Hmm, true, now imagine a client dealing with all these proprietary conventions. Add filtering and sorting to the mix. Also, how would one discover all these conventions? Documentation you say? And then deal with the results which will be expressed how the developer of a particular API method felt the day he implemented it. There is no consistency, no generic way to discover capabilities, hence no tools to help out. Some APIs went the way of OpenAPI specification to bring some sanity into the process. GraphQL is that plus more because it brings to the fore the familiar concept of a schema composed of types.
@ShawnThuris3 жыл бұрын
Clear and useful comparison.
@ambientcoder54623 жыл бұрын
Thanks Shawn 🙂
@__init__k9173 жыл бұрын
Brooo you are awesome 🤘🤘🤘, I am grateful to discover this channel
@ambientcoder54623 жыл бұрын
Thanks bro! 🤘🤘 Hope you enjoy the content 🙂
@audreydelgado21983 жыл бұрын
Great information & explanation. Thank you .
@ambientcoder54623 жыл бұрын
Glad it was helpful!
@aarontheeranitpongtongmuan2333 жыл бұрын
Great explanation. Thank you so much.
@ambientcoder54623 жыл бұрын
Glad you liked it!
@LarryPeteet Жыл бұрын
Excellent, Thank you!
@chituvabachube80576 ай бұрын
Amazing series!
@patricktamal63663 жыл бұрын
Very helpfull Thanks.
@lemannequin7203 Жыл бұрын
excellent
@sauravpathak18023 жыл бұрын
Thank you for the great content. Please keep posting more videos.
@ambientcoder54623 жыл бұрын
Thank you for the kind words :)
@ahmadkelany2 жыл бұрын
Thanks very much, that's really helpful.
@rogervezaro3 жыл бұрын
Very helpfull video, thank you!
@ambientcoder54623 жыл бұрын
I’m glad to hear that, thanks 🙂
@ameyjain34623 жыл бұрын
what are AWS APIs. Just by looking at the API its hard to tell whether they are RPS or REST? Or I am missing some pointer to identify?
@ambientcoder54623 жыл бұрын
Hi Amey, usually the best way to identify if an API is REST or RPC is by reading the API docs. You can also rely on the API URLs to give you hints. REST follows a very structure resource naming pattern whereas RPC will include action oriented naming in the URLs. To be absolutely sure, looking up the docs is the best way.
@imradzi7 ай бұрын
in order to use RPC such as gRPC you must use its proto file and generate a stub file in any language of your choice.
@aryanrahman32123 жыл бұрын
Just what I was looking for!
@maloxkurambada11292 жыл бұрын
nice and clean
@aymanimtyaz85293 жыл бұрын
This is great!
@ambientcoder54623 жыл бұрын
Glad you liked it :)
@hn0312 жыл бұрын
Can two of these be combined in a single application?
@ambientcoder54622 жыл бұрын
It depends. Some API providers do provide a combination of API paradigms, but only when there is a clear separation of domain contexts. For example, if you provide a users endpoint using REST, it's probably best not to provide an RPC API for the same users data either. But if it's for a completely different context, then it might be acceptable.
@C0sm1c_Owl3 жыл бұрын
thanks!
@jinshuenjameslo96472 жыл бұрын
Not enough info on RPC. The pros/cons of rest api and rpc depends on how you implement the apis in the backend. You could have a rest api that does more actions too (search, retrieve, update and return updated resource for example)
@pubdigitalix Жыл бұрын
What happens to SOAP web services? Many enterprises use it a lot.
@femiojo992 жыл бұрын
Great video
@keivansf34592 жыл бұрын
Thanks!
@gabberfrombcn3 жыл бұрын
I guess you meant "you don't want to use verbs" at 6:05
@ambientcoder54623 жыл бұрын
You’re right I got that wrong! Thanks for pointing this out.
@debashisdeb4722 жыл бұрын
I don't understand, why would anyone model Search using REST model, using a PUT, as shown in your video (6:31). Search is more alligned to a GET with query params.
@danielvega6465 ай бұрын
Love you.
@faiqkhan75452 жыл бұрын
yo sir, why aren't you posting now a days. please post series like this. thankyou
@ambientcoder54622 жыл бұрын
I apologize for the lack of videos. I hope to find time to make videos in the near future. Thanks for your support, really appreciate it!
@vladasolovei61692 жыл бұрын
cool!
@ross-morozov3 жыл бұрын
7:55 excuse me, could someone explain why we cannot reach a subresource just by going to PUT /users/user-1/deactivate ?
@DBZM1k32 жыл бұрын
With regards to this it depends on the layout of your data. But as an example you might keep your user data and order data separate and to keep track of who has ordered what you use the user id. This presents a problem where you have to GET the User data for their id first and then pass that user id to a second GET method for all the orders a User has made. It doesn't necessarily have to be this way but these sorts of things can generally happen with REST APIs. In other APIs like GraphQL you don't have to worry about this sort of thing because relationships between data are generally more expressive. And allows stitching together of different schemas to get the desired result. As with the example above you can get around it with a REST API but only if the data shares some commonality. For situations where the data doesn't share common information you are kind of stuck. Such as grabbing events in your area as well as the predicted weather for those events. Especially if you are using the API of another service such as openweathermap's API.
@vivarantx3 жыл бұрын
great
@ambientcoder54623 жыл бұрын
Thanks 🙂
@Lunolux3 жыл бұрын
nice
@ambientcoder54623 жыл бұрын
Thanks 🙂
@denemedenemeoğlu-u8i Жыл бұрын
where is soap?
@artemkravchenko1134 Жыл бұрын
From 7:13 Is not true. You can select particular field from entity not downloading whole entity.
@wasd31082 жыл бұрын
deactivate, rest, PATCH /users/user-1 , status: 'deactivated' there's no need for actions
@dennisk648 Жыл бұрын
There are no such a “problems” in Rest CRUDs. It is not a protocol, but an agreement, a pattern
@TheHalloween812 жыл бұрын
Try to reduce noise of background music, when it's on high nodes you are barely audible, TBH it's not adding any value.
@bharatjadhav90752 жыл бұрын
bas na bhau kiti ata .rest paryant mahit hot ata jara jast hotay
@erik1974Fortal Жыл бұрын
GRAPHql is always POST.
@artemkravchenko1134 Жыл бұрын
7:45 is not true
@PradipLamsal-s8m6 ай бұрын
He adds "not in a RESTful manner, anyway" so that should make his statement true.
@darkkuja22 Жыл бұрын
the high hats of the rap music in the background are very distracting