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.

Austin API Summit 2018: Are REST APIs Still Relevant Today?

300 views

Published on

A look at common API styles available today, a look back at historical API styles, and guidance for selecting the right API styles for your organization. Deep-dive of HTTP, mentioned in the presentation, can be found at: http://bit.ly/power-http

Published in: Software
  • Be the first to comment

Austin API Summit 2018: Are REST APIs Still Relevant Today?

  1. 1. Are REST APIs Still Relevant Today? 13 June 2018 @ Austin API Summit James Higginbotham @LaunchAny
  2. 2. 2 Introduction • API Strategy, Program Execution, Training – API design – Microservices – Containerization • Recent Projects – Enterprise IT – SaaS – From 100s to 10s of thousands of developers – Variety of verticals
  3. 3. 4 APIs Solve a Variety of Use Cases Customer Experience Worker Experience Supplier/Partner Experience
  4. 4. 5 APIs Offer Different Interaction Styles Request/ Response Request/ Acknowledge Batch Publish/ Subscribe Message Streaming
  5. 5. 6 APIs: Looking Back at History
  6. 6. 7 The Road So Far… 1990s RPC & Distributed Object Integration
  7. 7. 8 CORBA Architecture
  8. 8. 9 The Road So Far… 1990s RPC & Distributed Object Integration 2000s Corp-to-Corp Integration
  9. 9. 10 SOAP Protocol Support: Tunneling through HTTP, SMTP, JMS Source: https://stackoverflow.com/questions/15705892/what-is-the-purpose-of-ws-addressing
  10. 10. 11 SOAP w/ Asynchronous Callbacks Source: https://docs.oracle.com/cd/E15523_01/web.1111/e15184/asynch.htm
  11. 11. 12 The Road So Far… 1990s RPC & Distributed Object Integration 2000s Corp-to-Corp Integration 2010s + Mobile/Data Integration
  12. 12. 13 The Power of the HTTP Protocol for APIs
  13. 13. 14 The Basics: URLs, Headers, and HTTP Methods Method Safe (Side- Effect?) Idempotent GET Yes Yes POST No No PUT No Yes PATCH No No DELETE No Yes HEAD Yes Yes
  14. 14. 15 Content Negotiation: Supporting Multiple Content Types GET https://api.example.com/projects HTTP/1.0 Accept: application/json;q=0.5,application/xml;q=1.0 HTTP/1.0 200 OK Date: Tue, 16 June 2015 06:57:43 GMT Content-Type: application/xml <project>…</project> 15
  15. 15. 16 Language Negotiation: Supporting Multiple Languages GET https://api.example.com/projects HTTP/1.0 Accept-Language: en;q=0.5,de;q=1.0 HTTP/1.0 200 OK Date: Tue, 16 June 2015 06:57:43 GMT Content-Language: en <project> <status>active</status> <status-display>active</status-display> </project> 16
  16. 16. 17 Language Negotiation: Supporting Multiple Languages GET https://api.example.com/projects HTTP/1.0 Accept-Language: en;q=0.5,de;q=1.0 HTTP/1.0 200 OK Date: Tue, 16 June 2015 06:57:43 GMT Content-Language: de <project> <status>active</status> <status-display>angenommen</status-display> </project> 17
  17. 17. 18 Client-Side Caching: Improving App Performance Source: https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching
  18. 18. 19 Intermediary Caching: Reducing Network Latency with Proxies and CDNs Source: https://www.maxcdn.com/one/visual-glossary/proxy-caching/
  19. 19. 20 Conditional Requests: Staying Up-to-date Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Conditional_requests
  20. 20. 21 Concurrency Control: Protecting Resource Integrity with Optimistic Locking Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Conditional_requests
  21. 21. 22 “The Power of HTTP for APIs” 2-part series: http://bit.ly/power-http
  22. 22. 23 A Look at Today’s Common API Styles
  23. 23. 24 Popular API Styles in 2018
  24. 24. 25 GraphQL Example: POST query Source: https://blog.octo.com/en/graphql-a-new-actor-in-the-api-world/
  25. 25. 26 Advantages of GraphQL Hierarchical Data Support Field-Level Selection Strong Typing Good Fit for Front-End APIs Introspection
  26. 26. 27 Challenges for Some GraphQL Implementors Limited Endpoint Security Enforcement Limited Ops Tooling Inconsistencies in Recommendations Lack of Flexibility for Content Types Lack of Cacheability
  27. 27. 28 Popular API Styles in 2018
  28. 28. 29 gRPC: Example Service Definition, Server, and Client Source: https://grpc.io/docs/quickstart/node.html
  29. 29. 30 Advantages of gRPC High Performance/ Low Latency Protobuf Message Format Code Generation (client and server) Bi-Directional Communication Built On HTTP/2
  30. 30. 31 Challenges for Some gRPC Implementors Limited Error Handling Limited Dev/Ops Tooling Inconsistent Code Gen Across Languages Lack of Flexibility for Content Types Lack of Cacheability
  31. 31. 32 Popular API Styles in 2018
  32. 32. 33 REST APIs are stuck in the land of CRUD
  33. 33. 34 Revisiting the REST Constraints Client-Server Stateless Cache Layered System Code on Demand (optional) Uniform Interface (resources, representations, hypermedia)
  34. 34. 35 Deep-Dive: REST’s Layered and Cache Constraints Logging AccessManagement RateLimiting Caching Custom APIImplementation LoadBalancer CDN/EdgeCache Client Network Infra API Management Layer Your Code Client Cache HTTP HTTP HTTP HTTP
  35. 35. 36 HTTP HTTP HTTP Operationalizing Your API: There is more to your API than code! Logging AccessManagement RateLimiting Caching Custom APIImplementation LoadBalancer CDN/EdgeCache Client Network Infra API Management Layer Your Code Client Cache HTTP
  36. 36. When APIs Meet Jobs-To-Be-Done { … "_links": { “self": {"href": "/approval-requests/d796f2d0eb72492bb088"}, “approve": {"href": "/approval-requests/d796f2d0eb72492bb088/approve"}, “decline": {"href": "/approval-requests/d796f2d0eb72492bb088/decline"}, }, … }
  37. 37. 38 Popular API Styles in 2018
  38. 38. 39 Webhooks, SSE, and Message Streaming
  39. 39. 40 Some Things Change, But Some Stay the Same +
  40. 40. 41 Are REST APIs Still Relevant?
  41. 41. 42 Yes!
  42. 42. 43 Yes! Yes, and…
  43. 43. 44 #1: We must spend time to understand the business problem first, not the technology
  44. 44. 45 #2: We all must become better educated with what HTTP has to offer, rather than reinventing the HTTP protocol over-and- over (then tunneling it via HTTP)
  45. 45. 46 #3. Evolve our tools and frameworks to better take advantage of HTTP: caching, concurrency control, hypermedia
  46. 46. 47 #4. Our thinking must move ”beyond code on the laptop” and into business use cases, ops, compliance, and support concerns
  47. 47. 48 #5. Stop using ‘vs.’ and start using ‘and’ when it comes to selecting API styles
  48. 48. 49 Moving the Mindset From “vs.” to “and” + + + + +
  49. 49. James Higginbotham james@launchany.com @launchany https://apideveloperweekly.com Thank you

×