0
Want To Make Your API Stick?Try Story Telling...REST API Level 5Trek To The SummitPat CappelaereSoftware Architect - NASA ...
You Have Heard of Richardson Maturity Level 3                     http://martinfowler.com/articles/richardsonMaturityModel...
Bad News: I Think There is More....To The Summit !                                          REST                          ...
Why Level 5? The Disaster Management Enterprise                       Copyright © 2008 Leonard Hango, Namibia Dept. of Wat...
OGC [Many] APIs - Too Low Level - Too Complex                                                  RM Level < 2               ...
RM Level 3 Is Great But...• Where Is The User? The User Does Not [Necessarily] Care About Your Resources!   6
User CentricLevel 5 API Approach• Use Story Telling To Convey Information to Access/Share The Information• Define User Acti...
Let’s Illustrate This With A Story...  Port-Au-Prince Hawai        Flooding                                        8
User Response                                           GoalPort-Au-Prince Hawai Flooding   Get Floodmap Port-au-Prince   ...
QueryPort-Au-Prince Hawai Flooding           Get Floodmap Port-au-Prince                                            Send Q...
Get Available BehaviorsPort-Au-Prince Hawai Flooding           Get Floodmap Port-au-Prince                                ...
Execute And Achieve Goal                                                                        Floodmap Port-au-PrincePor...
Activities Appears In User Timeline and News Feed       Now They Can be Shared (Discovered And Duplicated)   13
Level 4: Define Activities• See Activity Streams Protocol or Facebook  OpenGraph API• Activity (or Story):   • {actor} {ver...
Required [Minimum] Semantic Information                                          15
VerbsObjects          16
Level 5: Define Behaviors• Not Unlike Behavior Driven DevelopmentWe Are Taking About Behaviors We Can Discover And      Exe...
Encoding Behavior...                       Hierarchical Finite State MachinesMany Options...                              ...
Behavior Trees                                           Par                                                              ...
Putting It Together: Start From GOAL              Client                   Server                                       Go...
Retrieve The Tree        Client       Server                     Goals                     Get Burnscar                   ...
Execute The Tree        Client                   Server                                  Resources         1       1      ...
Recap        Service                  23
You Start with User Stories...                   User                            Service                  Stories    Agile...
You Develop Test Scenarios...                  User                                      Service                 Stories  ...
You Implement Service and Test..                  User                                      Service                 Storie...
Your User Starts Using the API..                                               REST Level 1-3 API                   User  ...
Your User Starts Using the API..                                               REST Level 1-3 API                   User  ...
Level 4: Define User Activities From User Stories                   User                 Activities                   User ...
Level 5: Define Behaviors Wrapping User Activities                  User                             Behaviors             ...
Level 5: Execute Behaviors                                  REST Level 5 API                  User                        ...
What About Those Behavior Trees...?Game AI?                                      Alex ChampandardAI GameDev Understanding ...
MODIS Behavior Tree for FloodMap                                         Goal                    Floodmap                 ...
EO-1 Behavior Tree for FloodMap                                  Floodmap                                              PRO...
RADARSAT-2 Behavior Tree for FloodMap                                  Floodmap                         TASK              ...
Local User Tree For Floodmap (After Query)                        Goal                               Many SubTrees To Exec...
How To Define Behavior Trees...                                 Tree GUI Ruby DSL (Radial)           JavaScript            ...
Unexpected Benefit Of API Layer Level 5What’s Under The Cloud Does Not Matter As Much                                   RES...
Credits...                               jmettraux/ruote-fluo                               maryrosecook/machinejs         ...
API Level 5THANK YOUPat Cappelaereemail: pat at cappelaere.comtwitter: @cappelaereblog: http://blog.geobliki.comweb: http:...
Upcoming SlideShare
Loading in...5
×

REST Level 5 - A Trek To The Summit

8,989

Published on

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.

Published in: Technology
4 Comments
3 Likes
Statistics
Notes
  • 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.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • @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.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • 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?
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • 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?
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
8,989
On Slideshare
0
From Embeds
0
Number of Embeds
49
Actions
Shares
0
Downloads
16
Comments
4
Likes
3
Embeds 0
No embeds

No notes for slide
  • \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
  • Transcript of "REST Level 5 - A Trek To The Summit"

    1. 1. Want To Make Your API Stick?Try Story Telling...REST API Level 5Trek To The SummitPat CappelaereSoftware Architect - NASA SensorWeb 1
    2. 2. You Have Heard of Richardson Maturity Level 3 http://martinfowler.com/articles/richardsonMaturityModel.html Many Of You Are On This Journey... 2
    3. 3. Bad News: I Think There is More....To The Summit ! REST Level 3 Resources HTTP Verbs, Caching, Hypermedia Controls 3
    4. 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. 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. 6. RM Level 3 Is Great But...• Where Is The User? The User Does Not [Necessarily] Care About Your Resources! 6
    7. 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. 8. Let’s Illustrate This With A Story... Port-Au-Prince Hawai Flooding 8
    9. 9. User Response GoalPort-Au-Prince Hawai Flooding Get Floodmap Port-au-Prince 9
    10. 10. QueryPort-Au-Prince Hawai Flooding Get Floodmap Port-au-Prince Send Query Available Modis Radarsat EO-1 Services 10
    11. 11. Get Available BehaviorsPort-Au-Prince Hawai Flooding Get Floodmap Port-au-Prince Retrieve Behaviors Available Modis Radarsat EO-1 Services 11
    12. 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. 13. Activities Appears In User Timeline and News Feed Now They Can be Shared (Discovered And Duplicated) 13
    14. 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. 15. Required [Minimum] Semantic Information 15
    16. 16. VerbsObjects 16
    17. 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. 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. 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. 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. 21. Retrieve The Tree Client Server Goals Get Burnscar Get Floodmap 1 1 ✔ ✔ Get NDVI ✔ 1 1 ✔ ✔ ✔ 21
    22. 22. Execute The Tree Client Server Resources 1 1 HTTP POST ✔ Activity Activity Activity ✔ ✔ ActivityExecute Code-On-Demand 22
    23. 23. Recap Service 23
    24. 24. You Start with User Stories... User Service Stories Agile Development 24
    25. 25. You Develop Test Scenarios... User Service Stories Agile Development Test Scenarios Behavior Driven Development 25
    26. 26. You Implement Service and Test.. User Service Stories Agile Development Test Scenarios Behavior Driven Development 26
    27. 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. 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. 29. Level 4: Define User Activities From User Stories User Activities User Stories Agile Development 29
    30. 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. 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. 32. What About Those Behavior Trees...?Game AI? Alex ChampandardAI GameDev Understanding Behavior Treeshttp://aigamedev.com/open/article/bt-overview/ 32
    33. 33. MODIS Behavior Tree for FloodMap Goal Floodmap Activities GET GET TILE PRODUCT 33
    34. 34. EO-1 Behavior Tree for FloodMap Floodmap PROCESS TASK FLOODMAP GET ASSET ALGORITHM DATA GET SUBMIT FEASIBILITIES TASK 34
    35. 35. RADARSAT-2 Behavior Tree for FloodMap Floodmap TASK PROCESS GET ASSET DATA DATA GET SUBMIT FEASIBILITIES TASK 35
    36. 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. 37. How To Define Behavior Trees... Tree GUI Ruby DSL (Radial) JavaScript 37
    38. 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. 39. Credits... jmettraux/ruote-fluo maryrosecook/machinejs FaceBook OpenGraph TeamMike Amundsen Benjamin Young Stu Charlton Check His Keynotehttp://www.restfest.org/ 39
    40. 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
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×