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.

Real-time hypermedia APIs: Exploring the fundamentals of how we build networked application interfaces

542 views

Published on

Presentation from the developer track at I Love APIs London 2016 featuring Tom Christie, DabApps.

What problems are we running into building Web APIs today? How is the API landscape changing, and how can we build systems that communicate in more meaningful and robust ways?

* REST - Taking a look at the pain points today.
* API schemas - What they are and why they're valuable.
* Hypermedia - Why it hasn't yet fully lived up to its promises, and how it still might.
* Realtime - Can we build realtime interfaces in a more structured way?

This presentation takes a practical look at combining the best of REST, Hypermedia, and Realtime and demonstrates how to build self-describing APIs, how to use generic client libraries to communicate with these interfaces, and how to extend this to building interactive realtime services.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Real-time hypermedia APIs: Exploring the fundamentals of how we build networked application interfaces

  1. 1. COMMUNICATE HOW TO OR… “HOW WE CAN CREATE MORE MEANINGFUL, EXPRESSIVE INTERFACES, BUILD DYNAMIC CLIENT LIBRARIES & POWERFUL CLIENT TOOLING, & MOVE TOWARDS REALTIME HYPERMEDIA APIS.”
  2. 2. HOW TO COMMUNICATE LIMITATIONS OF OUR CURRENT APIS ▸ Not self-descriptive. ▸ Complexity as APIs grow. Ad-hoc endpoints. ▸ Can be inefficient. Multiple round-trips & overfetch. ▸ What about realtime?
  3. 3. HOW TO COMMUNICATE TACKLING API COMPLEXITY ▸ Schemas - API description, typically for documentation. ▸ Hypermedia - Modest uptake, no killer tooling. ▸ Graph QL - Motived by inefficiency & complexity.
  4. 4. THE FUNDAMENTALS What interface does the service present?
  5. 5. ▸ Define a DOM that clients interact with. ▸ Decouple the encoding and transport concerns.
  6. 6. HOW TO COMMUNICATE THE DOCUMENT MODEL ▸ Data: {…}, […],123, 123.456, “String”, true, false, null. ▸ Documents: Some content with an associated URL. ▸ Links: A URL, an action, and optionally some parameters.
  7. 7. HOW TO COMMUNICATE THE DOCUMENT MODEL ▸ Documents can be nested. ▸ Contain both links and data. ▸ Support either schemas or hypermedia.
  8. 8. HOW TO COMMUNICATE INTERACTING USING CORE API ▸ Client only interfaces at the document layer. ▸ Not concerned with network details in any way. ▸ Multiple encodings & transports supported.
  9. 9. 1. HOW TO COMMUNICATE 4. 2. 3.
  10. 10. ▸ Provide the document to act on. ▸ Index to a link in the document. ▸ Possibly some named parameters. HOW TO COMMUNICATE INTERACTING WITH OUR API
  11. 11. HOW TO COMMUNICATE MEANINGFUL INTERACTIONS ▸ Building network requests… ▸ Performing interactions…
  12. 12. HOW TO COMMUNICATE INTERACTING WITH EXISTING SERVICES
  13. 13. HOW TO COMMUNICATE INTERACTING WITH EXISTING SERVICES
  14. 14. HOW TO COMMUNICATE CLIENT TOOLING
  15. 15. HOW TO COMMUNICATE MULTIPLE ENCODINGS ▸ Core API servers can respond with a range of encodings.
  16. 16. HOW TO COMMUNICATE PARTIAL TRANSITIONS ▸ Interact with nested documents. ▸ Replace only the relevant part of the document tree.
  17. 17. HOW TO COMMUNICATE RICH INTERFACES
  18. 18. HOW TO COMMUNICATE RICH INTERFACES ▸ Not constrained to CRUD style APIs.
  19. 19. HOW TO COMMUNICATE REALTIME HYPERMEDIA APIS 1. 4. 2. 3. 5.
  20. 20. HOW TO COMMUNICATE REALTIME HYPERMEDIA APIS ▸ WebSockets support for realtime APIs.
  21. 21. HOW TO COMMUNICATE SUMMARY ▸ Meaningful, self-descriptive interfaces. ▸ Able to interact with existing schema/hypermedia formats. ▸ Schemas for an easy win. Hypermedia for rich interfaces. ▸ Encourages an interface-first API design style. ▸ Allows for powerful client tooling. ▸ Realtime Hypermedia APIs.
  22. 22. THANKS! Twitter: @_tomchristie www.coreapi.org

×