Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Build Scalable APIs Using GraphQL and Serverless

82 views

Published on

Current trends in software and backend architecture have been evolving towards a more loosely coupled, more granular design. Most of you have heard of micro-service based architectures; the latest development in the past couple of years has been the advent of Serverless which allows you to run applications in very cost effective ephemeral services.

This is why it is important to have a proper gateway for your API that is able to route all your requests to the designated endpoint. GraphQL stands out in that respect as being a mature open sourced standard started at Facebook. Simona will demonstrate how to set up a GraphQL server locally, then explore the Query language and schema definitions it provides which allows you essentially query your mesh of services from a single point of entry.

The beauty is that it will notify you early if any of your endpoints is misbehaving or the schemas are out of date by erring out. Another advantage is that it allows for your API documentation to be a real time process and it will give you what one may call an API playground where you can query and explore your API. After exploring Serverless API, Simona will have a look at the more advanced features and standards around mutators and resolvers and then she will close by going all in, full Serverless and deploy a GraphQL server to a function in the cloud.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Build Scalable APIs Using GraphQL and Serverless

  1. 1. Build Scalable APIs using GraphQL and Serverless
  2. 2. @simona_cotin
  3. 3. @simona_cotin
  4. 4. @simona_cotin
  5. 5. @simona_cotin
  6. 6. @simona_cotin
  7. 7. @simona_cotin –-Lee Byron a data-fetching API powerful enough to describe all of Facebook
  8. 8. @simona_cotin
  9. 9. @simona_cotin https://facebook.com/user/id https://facebook.com/user/id/events https://facebook.com/user/id/friends-suggestions https://facebook.com/user/id/friends-birthdays
  10. 10. @simona_cotin@simona_cotin https://facebook.com/user/id/events { "name": “Webunleashed", "location": "Toronto", "organiser": "FITC", "speakers": [ { "name": “Jen Looper", "company": " ", "role": “Vue Vixens Founder” } ] }
  11. 11. @simona_cotin
  12. 12. @simona_cotin Overfetch Or New endpoint
  13. 13. @simona_cotin
  14. 14. @simona_cotin https://facebook.com/user/id/friends-suggestions
  15. 15. @simona_cotin https://facebook.com/user/id/friends-suggestions/id/mutual
  16. 16. @simona_cotin Underfetch Or New endpoint
  17. 17. @simona_cotin Delay User Perception 0-100 ms Instant 100-300 ms Small perceptible delay 300-1000 ms Machine is working 1000+ ms Likely context switch 10000+ ms Task is abandoned High performance Browser Networking https://hpbn.co
  18. 18. @simona_cotin –-Ilya Grigorik The fastest network request is a request not made
  19. 19. @simona_cotin
  20. 20. @simona_cotin Schema driven development
  21. 21. @simona_cotin Strongly typed
  22. 22. @simona_cotin
  23. 23. @simona_cotin
  24. 24. @simona_cotin
  25. 25. @simona_cotin
  26. 26. @simona_cotin
  27. 27. @simona_cotin
  28. 28. @simona_cotin
  29. 29. @simona_cotin ✓ Performance ✓ Flexibility ✓ Tooling GraphQL
  30. 30. @simona_cotin Serverless
  31. 31. @simona_cotin –-Steve Jobs The line of code that’s the fastest to write,that never breaks, that doesn’t need maintenance, is the line you never had to write.
  32. 32. @simona_cotin API using Serverless
  33. 33. @simona_cotin
  34. 34. @simona_cotin API using Serverless
  35. 35. @simona_cotin API using Serverless and GraphQL
  36. 36. @simona_cotin In practice GraphQL endpoint GraphiQL UI
  37. 37. @simona_cotin GraphQL endpoint
  38. 38. @simona_cotin GraphiQL UI
  39. 39. @simona_cotin ✓ Reusable API ✓ Autoscaling ✓ Easy Integration Datasources
  40. 40. @simona_cotin No servers to manage
  41. 41. @simona_cotin Serverless
  42. 42. @simona_cotin
  43. 43. @simona_cotin
  44. 44. @simona_cotin
  45. 45. @simona_cotin
  46. 46. @simona_cotin
  47. 47. @simona_cotin
  48. 48. @simona_cotin
  49. 49. @simona_cotin
  50. 50. @simona_cotin
  51. 51. @simona_cotin
  52. 52. @simona_cotin Easy Integration of Datasources Autoscalability Less code Easy Abstraction of Datasources Single Endpoint Smaller no requests Serverless GraphQL
  53. 53. @simona_cotin Easy Integration of Datasources Easy Abstraction of Datasources Autoscalability Single Endpoint Less code Smaller no requests Dev productivity
  54. 54. @simona_cotin Achieve more by doing less
  55. 55. @simona_cotin Azure Account Azure CLI Azure Functions Azure Functions Premium Azure Static Websites Create-graphless Workshop https://aka.ms/sc-build-free https://aka.ms/sc-build-cli https://aka.ms/sc-build-functions https://aka.ms/sc-build-premium https://aka.ms/sc-build-static https://aka.ms/create-graphless https://github.com/simonaco/serverless -graphql-workshop Resources

×