REST vs. GraphQL: Critical Look

Поділитися
Вставка
  • Опубліковано 20 лип 2024
  • This is a session given by Zdenek “Z” Nemec at Nordic APIs 2018 Platform Summit on October 23rd, in Stockholm, Sweden.
    In this talk, Z will take a critical look at predominant API architectural style - RESTful APIs and put it in contrast to GraphQL and Hypermedia APIs. We will discuss the expected properties of distributed systems, the consequences of choosing a particular API style, and reflect these findings in the pros and cons of the popular methods.
    The talk inspired the blog post "REST vs GraphQL: How Constraints Determine API Style" nordicapis.com/rest-vs-graphq...
    ----------
    Get the latest API insights straight to your inbox, subscribe to Nordic APIs newsletter: nordicapis.com/newsletter/
  • Наука та технологія

КОМЕНТАРІ • 40

  • @samirsaeedi74
    @samirsaeedi74 5 років тому +103

    starts at 17:08

    • @xNReaperx
      @xNReaperx 4 роки тому +4

      Thank you

    • @batabatonica
      @batabatonica 4 роки тому +4

      people like you

    • @moritzw42
      @moritzw42 4 роки тому +3

      this type of comment is great and needed for 80% of all youtube videos.

  • @aiukar
    @aiukar 3 роки тому

    Thank you very much for this, Zdenek! Really helpful all the categories you present and how the different technical solutions match those categories. I definitely liked it and helped me understand a lot of concepts. Please, keep sharing :)

  • @osquigene
    @osquigene 4 роки тому +8

    Why choose between Rest and GraphQL? I mean both can live next to each other and you can take advantage of both, depending on what you want to expose. More or less: data -> graphql, all the rest -> rest

  • @osman3404
    @osman3404 5 років тому +14

    Woow! Honesty this they BEST talk on REST vs Graphql. I like how The conclusions of the speaker are based on objective criteria and very well understood concepts and standards.

    • @BGivo
      @BGivo 4 роки тому +4

      That's so strange, because I thought almost completely the opposite. It seems he presented his opinions as facts, and then drew conclusions from them as if they were facts.

  • @lexsoft3969
    @lexsoft3969 4 роки тому +1

    I am interested in learning GraphQL, knowing its advantage. But when I started to read its documentation, my motivation decreased, and turned to look at good articles on REST API and found one. I don't know. However, my goal is to have skill on both techs, knowing which areas each tech fits best.
    Btw the speaker, Zdenek Nemec is a good guy; he answered my question for suggestions via email. :)

  • @sonyvegasuser
    @sonyvegasuser 5 років тому +19

    Your REST pros and cons don't seem to align with any of the experience we have had in the last 10 years of building REST APIs. I'm not sure where you get that there is a high learning curve. You can build a REST API in spring framework with a handful of lines of code. I like GraphQL but this comparison seems very biased and slanted.

    • @KheraShanu
      @KheraShanu 5 років тому +5

      code for 10 more years and you will get it

    • @closure4791
      @closure4791 4 роки тому

      I also have no idea

    • @coolemur976
      @coolemur976 2 роки тому

      @Mike Dunn I think you talking about "so-called REST APIs" 19:56
      If you create REST API and follow all its rules, then things might get trickier.
      For a starter: REST API must be uniform. It must follow HTTP rules (right headers, right status codes, etc.). Have layered architecture. Rarely companies follows all the rules, because they want to make things happen quick.
      You can take "REST API" and ask yourself a question "why it's not a real REST".
      Most likely you will find a bunch of things that are not following REST architecture.

  • @param_at_youtube
    @param_at_youtube 5 років тому +1

    This video deserves more likes!!

  • @nitnekb1954
    @nitnekb1954 5 років тому

    Excellent, thx a lot "Z"!

  • @shaunwhyte6686
    @shaunwhyte6686 3 роки тому

    I dont really understand caching issues aside from Brower cache, aside from that you can cache like normal?

  • @a0um
    @a0um Рік тому

    @nordicapis what resources would you recommend to learn about REST and how to implement it?

  • @steveeuphrates-river7342
    @steveeuphrates-river7342 2 роки тому

    I like this presentation- good and bad points of each.

  • @martingauthier5245
    @martingauthier5245 5 років тому +2

    This is an AWSOME Talk on REST vs GraphQL. Good Job !!!!

  • @rodelias9378
    @rodelias9378 2 роки тому

    Well done! Thank you!!

  • @burnsnewman
    @burnsnewman 3 роки тому

    I'm dissapointed that the gRPC and protobuf were completely ignored here. Especially when talking about performance. Also, I don't agree with some of the disadvantages of GraphQL and advantages of REST. For example - I think that application-level caching is more significant than network level caching. You have to know what to cache and for how long - and this knowledge belongs to application, not the infrastructure. Also, some of the presented advantages (like paging and the whole HATEOAS) of REST APIs are not guaranteed by openapi/swagger specification and therefore can be subject of bikeshedding in same way as in GraphQL APIs.

  • @alex_chugaev
    @alex_chugaev 3 роки тому

    I think you can succeed with either of technologies if you're cooking them right

  • @SkywalkerWroc
    @SkywalkerWroc 5 років тому +4

    Not sure if the guy ever heard of OpenAPI standard... it solves large chunk of the complains he has about REST APIs, while most of the other issues he had were fundamentally sourced in lack of communication, poor project management, lack of architecture, he was lucky not to stumble upon similar issues with GraphQL, always new girlfriend is more sexy one, but you can screw up GraphQL just like you can screw up REST. Not to mention that some of the issues he has are also an advantages if you have someone with architect mindset in your team.
    REST is like a PC, GraphQL is like a next shiny console (with SOAP being one of the older generations of a console) - sure, there's plenty of shit on PCs, and it's easy to build one that doesn't work, but at the end of the day - it still holds the upper hand.

    • @KheraShanu
      @KheraShanu 5 років тому +1

      30:20 he talks about swagger, so I am pretty sure he knows OpenAPI standards

  • @mrwho2513
    @mrwho2513 5 років тому +3

    this was a "critical conclusion" based on your research, not a critical look on some examples

  • @FilipCordas
    @FilipCordas 4 роки тому

    Can someone explain to me how is GraphQL different than a regular graph database? How is this suppose to be better then a good fast graph database you probably won't be able to make it run faster than the database so why?

    • @intelligentornotintelligen5485
      @intelligentornotintelligen5485 4 роки тому +3

      it's not a database , it's an API..

    • @iex32
      @iex32 4 роки тому

      @@intelligentornotintelligen5485 ahaha LOL ))))

    • @h0ph1p13
      @h0ph1p13 3 роки тому

      Pretty much all they have in common is the word "graph" and maybe some of the concept. Outside of that - they are two completely different things.

    • @FilipCordas
      @FilipCordas 3 роки тому

      @@h0ph1p13 Well no GraphQL is to graph database what odata is to sql. Sure you could make odata work with anything but once you get into advance stuff you actually need you really can't make it work. This just one more needles abstraction for 99% of applications.

  • @TomerBenDavid
    @TomerBenDavid 3 роки тому

    :)

  • @BlackShampoo75
    @BlackShampoo75 5 років тому +4

    Oranges vs apple juice

  • @jonnytheponny5753
    @jonnytheponny5753 4 роки тому +13

    He is only advociting for REST, because with GraphQL he would loose its Job;-) GraphQL solves almost all Problems of REST and makes APIs so much easier and better.
    I spent a lot if time comparing REST versus GraphQL. GraphQL is in almost all cases the better choice.
    1.) REST only wins in having multiple Representations (that 90% of the users do not need)
    2.) REST can have a slightly better performance (due to parsing overhad of GraphQL)
    3.) in REST caching can be easier. (But I hardly know any API that uses standard Internet-Caches, what he talks about). Caching is so complex, you normally do inside the server and then it is the same for GraphQL and REST.
    4.) And yes, you have to do your homework with GraphQL to write query optimized Resolvers (N+1 Problem). But this is solvable.
    All the other cases he talks about you can have a completly oppositie view and stuff you can easily do with GraphQL, much better. It's like my dad defending that the music of the Beatles is the best music ever...

    • @gcfdcfgd2728
      @gcfdcfgd2728 4 роки тому +1

      What do you mean by "multiple Representations"?

  • @intelligentornotintelligen5485
    @intelligentornotintelligen5485 4 роки тому +1

    let's not use graphql , for the sake of engineering!

    • @hexchad765
      @hexchad765 4 роки тому +1

      I love when I find strange, emotional, but enthusiastic opinions. It gives more insight into the person than the question