REST Level 5 - A Trek To The Summit
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

REST Level 5 - A Trek To The Summit

on

  • 4,787 views

A REST Level 5 API is critical to allow users to meet their goals, perform activities, share and comments on those stories as they develop. This is the next generation API based on user stories, ...

A REST Level 5 API is critical to allow users to meet their goals, perform activities, share and comments on those stories as they develop. This is the next generation API based on user stories, activities and behaviors.

Statistics

Views

Total Views
4,787
Views on SlideShare
3,556
Embed Views
1,231

Actions

Likes
1
Downloads
12
Comments
4

41 Embeds 1,231

http://www.geobliki.com 420
http://geobliki.com 356
http://geobliki.org 176
http://blog.geobliki.com 120
http://ycmb.geobliki.com 40
http://triton.geobliki.com 19
http://165.225.129.23 15
https://twitter.com 7
http://radarsat2.geobliki.com 6
http://www.radarsat.geobliki.com 6
http://www.geobliki.org 5
http://radrarsat.geobliki.com 5
http://oauth.geobliki.com 5
http://geobpms.geobliki.org 4
http://www.eo1.geobliki.com 3
http://fa.geobliki.com 3
http://www.op.geobliki.com 3
http://geopbms.geobliki.com 3
http://openid.geobliki.com 3
http://geobpm.geobliki.com 3
http://tlaxtao.geobliki.com 3
http://op.geobliki.com 2
http://gebpms.geobliki.com 2
http://cbd.geobliki.com 2
http://www.365dailyjournal.com 2
http://scrc.geobliki.com 2
http://wwww.geobliki.com 2
http://geopbpms.geobliki.com 1
http://news.google.com 1
http://fire.geobliki.com 1
http://e01.geobliki.com 1
http://mail.geobliki.com 1
http://www.aether.geobliki.com 1
http://mai.geobliki.org 1
http://radarstat.geobliki.com 1
http://name.geobliki.com 1
http://www.slashdocs.com 1
http://mali.geobliki.org 1
http://trac.geobliki.com 1
http://radsat.geobliki.com 1
http://trac.geobliki.org 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • The Facebook coupling is not required and was simply convenient. You still have to annotate your resources with RDFa (lite) and you can use the existing Activity Stream Protocol to generate your own stories. There is no reason why you would not do your own OpenGraph using Neo4J or equivalent...
    But you certainly want to enhance your feeds with activity stream info... This is where the story starts propagating.
    Are you sure you want to
    Your message goes here
    Processing…
  • @cappelaere decoupling from FB would be beneficial for many reasons. also, adopting standard bindings and tools to convert OpenGraph and RDFa meta-data into JSON formatted activity stream messages would promote an ecosystem of third party clients and services that could integrate with the service.
    Are you sure you want to
    Your message goes here
    Processing…
  • Chris, This is an incredibly good question. Linked data will make the web even more powerful. RDFa + HTML feels the right weight to me. This describes well the objects. If you integrate your app within Facebook, FB takes care of generating the activity feed for you. Any web service could have a (non-exclusive) Facebook facet to handle this social interface. I am also toying with the idea of implementing a full opengraph capability on my service side (to own my content rather than FB)... Is this what you are thinking?
    Are you sure you want to
    Your message goes here
    Processing…
  • Hi Pat, good presentation. I'm wondering about the intersection between Linked Data and Activity Streams. A simple, well structured HTML linking notation made the Web pervasive and ubiquitous. I see a slide presents linked data using the OpenGraph specification (http://ogp.me/). How would the example data map to a Activity stream message formatted using JSON ( http://activitystrea.ms/specs/json/1.0 )? Do standard bindings and tooling exist to convert OpenGraph formatted web pages into ActivityStream objects?
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

REST Level 5 - A Trek To The Summit Presentation Transcript

  • 1. Want To Make Your API Stick?Try Story Telling...REST API Level 5Trek To The SummitPat CappelaereSoftware Architect - NASA SensorWeb 1
  • 2. You Have Heard of Richardson Maturity Level 3 http://martinfowler.com/articles/richardsonMaturityModel.html Many Of You Are On This Journey... 2
  • 3. Bad News: I Think There is More....To The Summit ! REST Level 3 Resources HTTP Verbs, Caching, Hypermedia Controls 3
  • 4. Why Level 5? The Disaster Management Enterprise Copyright © 2008 Leonard Hango, Namibia Dept. of Water Affairs. Used by permission. Map produced by Namibia Hydrological Services Copyright © 2011 DigitalGlobe, U.S. Geological Survey. Copyright © 2011 International Charter – Space and Major Disasters (http://www.disasterscharter.org/). Used by permission. D. Hiscock, A. Livitt, K. Piirtoniemi, Disaster Management http://pre drp.org Cycle Flooding in Northern Namibia April 2011 WorldView image (above), Radarsat (below) (http://www.disasterscharter.org/) Used by permission. Copyright © 2011 International Charter – Space and Major Disasters. People – Sensors – Data – Processes – Decision SupportRM-ODP Viewpoints We Need an An API For This • What are the purpose and scope for using satellite data in Disaster Management and Risk Assessment? • What activities are involved? 4 • In what organizational structures do (or must) these
  • 5. OGC [Many] APIs - Too Low Level - Too Complex RM Level < 2 WMS WFS WPS SPS WCS WCPS WfCS SOS WNS SAS CSW WPS-T WfCS WFS-T Many Competing Approaches (REST/RPC, SOAP, GeoServices...) 5 And Harmonization Issues
  • 6. RM Level 3 Is Great But...• Where Is The User? The User Does Not [Necessarily] Care About Your Resources! 6
  • 7. User CentricLevel 5 API Approach• Use Story Telling To Convey Information to Access/Share The Information• Define User Activities To Generate Products (and a Story)• Define Behaviors To Achieve User Goals By Sequencing Activities• Web Services Publish Their Behaviors On Request Based On User Goals• Users Execute Behaviors To Meet Goals and Retrieve ProductsUser Cares About Stories, Goals, Activities, Behaviors... 7
  • 8. Let’s Illustrate This With A Story... Port-Au-Prince Hawai Flooding 8
  • 9. User Response GoalPort-Au-Prince Hawai Flooding Get Floodmap Port-au-Prince 9
  • 10. QueryPort-Au-Prince Hawai Flooding Get Floodmap Port-au-Prince Send Query Available Modis Radarsat EO-1 Services 10
  • 11. Get Available BehaviorsPort-Au-Prince Hawai Flooding Get Floodmap Port-au-Prince Retrieve Behaviors Available Modis Radarsat EO-1 Services 11
  • 12. Execute And Achieve Goal Floodmap Port-au-PrincePort-Au-Prince Hawai Flooding Get Floodmap Port-au-Prince Execute And Retrieve Data Available Modis Radarsat EO-1 Services Too Coarse 12
  • 13. Activities Appears In User Timeline and News Feed Now They Can be Shared (Discovered And Duplicated) 13
  • 14. Level 4: Define Activities• See Activity Streams Protocol or Facebook OpenGraph API• Activity (or Story): • {actor} {verb} {object} {target} Not Unlike the User Stories of Agile Development Process 14
  • 15. Required [Minimum] Semantic Information 15
  • 16. VerbsObjects 16
  • 17. Level 5: Define Behaviors• Not Unlike Behavior Driven DevelopmentWe Are Taking About Behaviors We Can Discover And Execute On-Demand On The Client-Side 17
  • 18. Encoding Behavior... Hierarchical Finite State MachinesMany Options... intuitive reactive HFSM Behavior Trees Hierarchical Task Network Planners Scripting Workflows C++ Planners LUA autonomous integrated purposefule flexible http://aigamedev.com/open/articles/behavior-trees-part1/ http://aigamedev.com/open/articles/behavior-trees-part2/ Alex Champandard 18 http://aigamedev.com/open/articles/behavior-trees-part3/
  • 19. Behavior Trees Par 1! Seq Sel 1+ Task Action Task Action ✔ Cond Action Cond Action ✔ ✔ Par: Parallel Execution Seq: Sequential Execution (do all of them) Sel: Select First Successful Path Cond: Condition Task Action 19
  • 20. Putting It Together: Start From GOAL Client Server Goals Get Floodmap Port-au-Prince ✔1 1 Query Burnscar ✔ ✔ 1 1 Floodmap NDVI ✔ ✔ ✔ ... ✔1 1 ✔ ✔ 1 1 ✔ ✔ ✔ 20
  • 21. Retrieve The Tree Client Server Goals Get Burnscar Get Floodmap 1 1 ✔ ✔ Get NDVI ✔ 1 1 ✔ ✔ ✔ 21
  • 22. Execute The Tree Client Server Resources 1 1 HTTP POST ✔ Activity Activity Activity ✔ ✔ ActivityExecute Code-On-Demand 22
  • 23. Recap Service 23
  • 24. You Start with User Stories... User Service Stories Agile Development 24
  • 25. You Develop Test Scenarios... User Service Stories Agile Development Test Scenarios Behavior Driven Development 25
  • 26. You Implement Service and Test.. User Service Stories Agile Development Test Scenarios Behavior Driven Development 26
  • 27. Your User Starts Using the API.. REST Level 1-3 API User Service User Stories Agile Development Test Scenarios Behavior Driven Development Right? 27
  • 28. Your User Starts Using the API.. REST Level 1-3 API User Service User Stories Agile Development Test Scenarios Behavior Driven Development NOT 28
  • 29. Level 4: Define User Activities From User Stories User Activities User Stories Agile Development 29
  • 30. Level 5: Define Behaviors Wrapping User Activities User Behaviors Activities User Stories Agile Development Behaviors are Represented as Behavior Trees They Are The Means to User Goals They Sequence Activities 30
  • 31. Level 5: Execute Behaviors REST Level 5 API User Local Behaviors User Activities Behavior Tree User Service Stories Agile Development Test Scenarios • User Searches for Behaviors that Can Help Him Meet A Goal • User Retrieves Behavior Trees • User Executes Behavior On-Demand • Behavior Executes Activities • Activities Trigger Implementation 31
  • 32. What About Those Behavior Trees...?Game AI? Alex ChampandardAI GameDev Understanding Behavior Treeshttp://aigamedev.com/open/article/bt-overview/ 32
  • 33. MODIS Behavior Tree for FloodMap Goal Floodmap Activities GET GET TILE PRODUCT 33
  • 34. EO-1 Behavior Tree for FloodMap Floodmap PROCESS TASK FLOODMAP GET ASSET ALGORITHM DATA GET SUBMIT FEASIBILITIES TASK 34
  • 35. RADARSAT-2 Behavior Tree for FloodMap Floodmap TASK PROCESS GET ASSET DATA DATA GET SUBMIT FEASIBILITIES TASK 35
  • 36. Local User Tree For Floodmap (After Query) Goal Many SubTrees To Execute in Parallel (or Sequentially... Floodmap Sub-Trees MODIS EO-1 RADARSAT2 Retrived BT BT BT Dynamically .. .. .. .. .. .. .. .. .. .. 36
  • 37. How To Define Behavior Trees... Tree GUI Ruby DSL (Radial) JavaScript 37
  • 38. Unexpected Benefit Of API Layer Level 5What’s Under The Cloud Does Not Matter As Much REST Level 3 SOAP REST/RPC 38
  • 39. Credits... jmettraux/ruote-fluo maryrosecook/machinejs FaceBook OpenGraph TeamMike Amundsen Benjamin Young Stu Charlton Check His Keynotehttp://www.restfest.org/ 39
  • 40. API Level 5THANK YOUPat Cappelaereemail: pat at cappelaere.comtwitter: @cappelaereblog: http://blog.geobliki.comweb: http://www.vightel.comgithub: github.com/cappelaerelinkedin: www.linkedin.com/pub/pat-cappelaere/0/163/236 40