How to build a Unified API

39bb8762f3a25ebc00ebd75bc4f363af?s=47 Simon Wood
October 25, 2013

How to build a Unified API

Presentation on APIs at FOWA 2013

39bb8762f3a25ebc00ebd75bc4f363af?s=128

Simon Wood

October 25, 2013
Tweet

Transcript

  1. How to Build a Unified API

  2. Simon Wood @hpoom Holiday Extras Image by Barney Livingston -

    Flickr
  3. @hpoom

  4. @hpoom Over 40m visits and 500k bookings in the last

    5 years Give £20m revenue to hotels each year
  5. @hpoom

  6. Because of APIs I can tell you... Yesterday I walked

    6191 steps FitBit API The music I listen to most is Radiohead Last.fm API It is currently 13ºC in New York Yahoo Weather API The Brewery is located at lat: 51.520475 lon: -0.091471 Google Maps API @hpoom
  7. The Future is mobile The Future is social The Future

    is cloud @hpoom
  8. The Future is mobile The Future is social The Future

    is cloud The Future is APIs @hpoom
  9. APIs Mobile Social Cloud @hpoom Diagram by Sam Ramji -

    http://bit.ly/biz-apis
  10. What I am going to cover The Problem Solutions -

    Good and Bad Considerations Technology How you can do this too @hpoom
  11. LET’S TALK ABOUT THE PROBLEM @hpoom

  12. Multiple sources of data @hpoom

  13. @hpoom

  14. Multiple consumers of data @hpoom

  15. Shortbreaks traffic breakdown 18 months @hpoom Desktop Tablet Mobile

  16. @hpoom

  17. De couple @hpoom

  18. Hide legacy @hpoom

  19. Speed! @hpoom

  20. Source: Strangeloop Networks Case Study Amazon 100 milliseconds revenue 1%

    Mozilla 2.2 seconds downloads 60m per year @hpoom
  21. Scaleability @hpoom

  22. Be efficient with resource @hpoom

  23. SO WHAT IS THE THE SOLUTION @hpoom

  24. The Unified Bit @hpoom

  25. Website Application Layer Legacy Reservation System @hpoom

  26. Website Application Layer & API Legacy Reservation System Affiliates @hpoom

  27. Website Application Layer & API Legacy Reservation System Affiliates Hotel

    System Ticket System @hpoom
  28. Website Application Layer & API Legacy Reservation System Affiliates Hotel

    System Ticket System @hpoom
  29. Unified API Website Mobile App Affiliates Smart TV Hotels Tickets

    Transport Food Multiple consumers of data Multiple sources of data @hpoom
  30. Proxy @hpoom

  31. Website Application Layer Legacy Reservation System @hpoom

  32. Website Application Layer Unified API Legacy Reservation System New System

    Proxy @hpoom
  33. Hierarchical @hpoom

  34. Website Application Layer Unified API Legacy Reservation System New System

    @hpoom
  35. Website Application Layer Unified API Product API Content API Price

    & Availability Name Star Rating Facilities @hpoom
  36. Website Application Layer Unified API Product API Content API Hotels

    Tickets Transport @hpoom
  37. Website Application Layer Unified API Product API Content API Hotels

    Tickets Transport Legacy New Affiliate @hpoom
  38. Micro-service architecture Idea by Fred George - http://bit.ly/fred-george @hpoom

  39. Traditional Enterprise Architecture Micro Service Architecture Diagram by James Hughes

    - http://bit.ly/micro-service @hpoom
  40. Website Application Layer Unified API Content API @hpoom

  41. Authentication @hpoom

  42. Unified API Website Mobile App Affiliates Smart TV Hotels Tickets

    Transport Food Auth Use OAuth 2.0 @hpoom
  43. Standardise your payloads @hpoom

  44. PUBLIC SERVICE ANNOUNCEMENT @hpoom This is THE correct way to

    write numeric dates 2013-10-25 Source XKCD - http://bit.ly/iso-date
  45. Checksum tricks @hpoom MD5 ("Checksum tricks") = 1aef67e94cf84d9c4200e24cbdc9f93d

  46. Cache & async requests @hpoom

  47. Unified API Website Mobile App Affiliates Smart TV Hotels Tickets

    Transport Food Async Total request time is only as slow as the slowest provider 1.2s 0.8s 1.1s 0.6s @hpoom
  48. Unified API Website Mobile App Affiliates Smart TV Hotels Tickets

    Transport Food Cache Cache Cache Cache Cache If we hit the top cache respond in 0.04s @hpoom
  49. In summary Solutions Unified API Standard Payloads Micro Services Proxy

    Cache & Async Hierarchical Problems Multi Data Sources Multi Consumers Decouple Hide Legacy Speed Scaleability @hpoom
  50. SOME CONSIDERATIONS @hpoom

  51. Open & Commercial @hpoom

  52. The right way to rate limit @hpoom

  53. Unlimited pools of talent @hpoom Chris Jason, ESPN - http://bit.ly/espnapi

  54. Debugging & Logs @hpoom

  55. Our log data in loggly @hpoom

  56. 300k unique payloads 3GB JSON logged daily @hpoom

  57. WHAT TECHNOLOGY? @hpoom

  58. We use... @hpoom express web application framework for node

  59. Yesterday’s Standard SOAP XML Today’s Standard REST JSON Keep it

    simple! @hpoom
  60. @hpoom

  61. Language does not matter @hpoom

  62. WHERE TO START? @hpoom

  63. What do you hate? @hpoom

  64. Where are you going? @hpoom

  65. Which public APIs could you consume? @hpoom

  66. Who needs access? @hpoom

  67. Good docs @hpoom Pusher Blog - http://bit.ly/devapidocs

  68. TAKE AWAYS @hpoom

  69. Consume your own APIs @hpoom uses to build Source Zach

    Holman - http://bit.ly/githubdogfood uses to build
  70. @hpoom “You wouldn't really think that an online bookstore needs

    to be an extensible, programmable platform. Would you?” Steve Yegge Source Steve Yegge - http://bit.ly/yegge
  71. The future of web apps is Unified APIs @hpoom

  72. Thanks http://bit.ly/unifiedapi @hpoom We’re hiring - http://bit.ly/hx-sb twitter + github

    Simon Wood