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.

Building APIs That Last for Decades - Irakli Nadareishvili, Director of API Strategy, API Academy

1,237 views

Published on

Irakli Nadareishvili's, Director of API Strategy for CA API Academy, speaking session for Nordic APIs was on "Building APIs That Last for Decades"

Building APIs That Last for Decades - Irakli Nadareishvili, Director of API Strategy, API Academy

  1. 1. ! Irakli!Nadareishvili! Director!of!API!Strategy,!CA!Technologies! ! @inadarei!
  2. 2. !?! BUT WHY?
  3. 3. 2013: 80 devices /sec Source:!Cisco!
  4. 4. 2014: 100 devices /sec Source:!Cisco!
  5. 5. 2020: 250 devices /sec Source:!Cisco!
  6. 6. 2020: 50bn conn. devices Source:!Cisco!
  7. 7. You Assume Control?
  8. 8. !
  9. 9. Hypermedia-Oriented Style What!if!the!server!could!dynamically! tell!the!client!what!the!client!can!do! and!how,!guiding!the!client!from!one! desired!state!to!another?! Avoid&'ght&coupling&and&hardcoding!& @inadarei
  10. 10. Response = Data + Controls API!server!would!have!to!send!client! not!just!sta$c!data,!but!also!controls! describing!API!affordances.! @inadarei
  11. 11. Hypermedia per Fielding "Hypermedia!is!defined!by!the!presence!of! applicaQon!control!informaQon!embedded! within,!or!as!a!layer!above,!the! presentaQon!of!informaQon!(2001)! Architectural!Styles!and!the!Design!of! NetworkFbased!SoGware,!2001! F!Roy!T.!Fielding!
  12. 12. Affordances Affordances!are!all!acQon!possibiliQes! latent!in!the!environment.! ! @inadarei Theory!of!Affordances,!1979! F!James!J.!Gibson! !
  13. 13. Affordances @inadarei
  14. 14. Affordances @inadarei
  15. 15. Affordances’re key to a good design Imagine!a!car!or!a!building!that!you!couldn't! possibly!use,!unless!you!had!a!manual.!That! sounds!silly,!we!don't!build!cars!or!buildings! like!that.!Yet,!that!is!exactly!how!we!build! APIs!today.!
  16. 16. Familiarity Creates Usability Are!all!cars!exactly!the!same?!No.!Can!we!do! basic!things!with!any!car,!once!we!understand! how!cars!in!general!work?!Yes!!Do!we!need!to! read!a!manual!for!that?!No!!
  17. 17. Common vocabulary: in Media Types paginaQon,!internaQonalizaQon,!templated!querying,!data!updates…!
  18. 18. Semantic GAP
  19. 19. Profiles RFC6906:!! [Profile!link!relaQon!defines]!addiQonal! semanQcs!that!can!be!used!to!process!a! resource!representaQon,!such!as!constraints,! convenQons,!extensions,!or!any!other!aspects! that!do!not!alter!the!basic!media!type!semanQcs! Profiles!can!be!combined,!meaning!that!a!single! resource!representaQon!can!conform!to!zero!or! any!number!of!profiles.!
  20. 20. Profile Examples: 1. XMDP (HTML-only) http://gmpg.org/xmdp/ 2. PMP (CDoc-only) https://github.com/publicmediaplatform/pmpdocs/ wiki/Profile-profile 3. ALPS http://www.ietf.org/id/draft-amundsen-richardson-foster- alps-00.txt And!many!others…!
  21. 21. OMG! This Feels So Complicated! @inadarei
  22. 22. No, It Is Not Complicated! You!are!already!very!familiar!with!all!of!it:!World! Wide!Web!is!a!perfect!Hypermedia!system!and! HTML!is!one!of!the!most!successful!hypermedia! types.! @inadarei
  23. 23. When in doubt: Always!draw!parallels!with!web!and!think!about:! “—Ok,sohowwouldIdothisifIwasjust buildingawebsiteandthiswasjustHTML?” @inadarei Bingo! Except!HTML![usually]!deals!with!unstructured!content!and! is!not!always!appropriate!for!APIs!that!marshal!structured! data.!Let’s!do!a!ligle!more!of!the!learning!thing.!
  24. 24. 7-Step Design Process 1. List Semantic Descriptors 2. Draw a State Diagram 3. Reconcile Names 4. Choose a Media Type 5. Write a Profile 6. Implementation 7. Publication Source:!Richardson!!Amundsen,!Resiul!Web!APIs!
  25. 25. #2 State Diagram Example: Blog List of blog posts Create blog post Save post
  26. 26. #3 Reconcile Names 1. IANA Link Relations http://www.iana.org/assignments/link-relations/link-relations. xhtml 2. Microformats Link Relations http://microformats.org/wiki/existing-rel-values 3. Dublin Core Metadata Element Set, Version 1 http://dublincore.org/documents/dces/ Source:!M.!Amundsen,!UBER!Hypermedia!Format!
  27. 27. #4 Choose a Hypermedia Type 1. UBER (http://uberhypermedia.org) 2. Collection+JSON (Col.Doc) 3. HAL 4. Siren 5. JSON:API 6. HTML (yeap! Just ask Jon Moore)
  28. 28. 7-Step Design Process 1. List Semantic Descriptors 2. Draw a State Diagram 3. Reconcile Names 4. Choose a Media Type 5. Write a Profile 6. Implementation 7. Publication Source:!Richardson!!Amundsen,!Resiul!Web!APIs!
  29. 29. Who Uses Hypermedia APIs? 1. AWS Streaming API 2. ElasticPath Cortex 3. Comcast 4. Microsoft Lync 5. Paypal 6. Github 7. FoxyCart 8. Huddle 9. Public Media Platform 10. … You?
  30. 30. What now? 1. Follow @mamund 2. Follow @apiacademy 3. Follow @darrel_miller 4. Follow @jharmn 5. Follow @kinlane (always) 6. Follow @inadarei (if you want) 7. Dave Goldberg’s Hypermedia Resources: http://davejonathangoldberg.github.io/apis/hypermedia/2014/08/08/ hypermedia-resources/ 8. Hypermedia Google Group https://groups.google.com/forum/#!forum/hypermedia-web 9. UBER Google Group https://groups.google.com/forum/#!forum/uber-hypermedia Be involved. This is a super-active and exciting space!

×