SlideShare uma empresa Scribd logo
1 de 40
Want To Make Your API Stick?
Try Story Telling...

REST API Level 5
Trek To The Summit


Pat Cappelaere
Software Architect - NASA SensorWeb




                                      1
You Have Heard of Richardson Maturity Level 3




                     http://martinfowler.com/articles/richardsonMaturityModel.html




     Many Of You Are On This Journey...                                              2
Bad News: I Think There is More....To The Summit !



                                          REST
                                          Level 3
                                          Resources
                                          HTTP Verbs, Caching,
                                          Hypermedia Controls




                                                             3
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 Support

RM-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
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
RM Level 3 Is Great But...

• Where Is The User?




 The User Does Not [Necessarily] Care About Your Resources!   6
User Centric
Level 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 Products




User Cares About Stories, Goals, Activities, Behaviors...
                                                                            7
Let’s Illustrate This With A Story...
  Port-Au-Prince Hawai
        Flooding




                                        8
User Response
                                           Goal
Port-Au-Prince Hawai Flooding   Get Floodmap Port-au-Prince




                                                              9
Query

Port-Au-Prince Hawai Flooding           Get Floodmap Port-au-Prince




                                            Send Query




                  Available     Modis         Radarsat          EO-1
                  Services




                                                                       10
Get Available Behaviors

Port-Au-Prince Hawai Flooding           Get Floodmap Port-au-Prince




                                        Retrieve Behaviors




                  Available     Modis         Radarsat          EO-1
                  Services




                                                                       11
Execute And Achieve Goal
                                                                        Floodmap Port-au-Prince
Port-Au-Prince Hawai Flooding            Get Floodmap Port-au-Prince




                                         Execute And Retrieve Data




                  Available      Modis         Radarsat          EO-1
                  Services


                                 Too
                                Coarse
                                                                                                  12
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} {verb} {object} {target}   Not Unlike the User Stories of Agile Development Process




                                                                                                   14
Required [Minimum] Semantic Information




                                          15
Verbs




Objects




          16
Level 5: Define Behaviors

• Not Unlike Behavior Driven Development




We Are Taking About Behaviors We Can Discover And
      Execute On-Demand On The Client-Side          17
Encoding Behavior...
                       Hierarchical Finite State Machines

Many 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/
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
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
Retrieve The Tree
        Client       Server

                     Goals


                     Get Burnscar


                     Get Floodmap
                                     1 1
                                    ✔ ✔
                      Get NDVI      ✔
          1      1
          ✔
      ✔          ✔

                                       21
Execute The Tree
        Client                   Server




                                  Resources
         1       1
                     HTTP POST
         ✔                        Activity
                                   Activity
                                    Activity
        ✔       ✔                    Activity

Execute Code-On-Demand
                                                22
Recap




        Service




                  23
You Start with User Stories...




                   User
                            Service
                  Stories


    Agile Development




                                      24
You Develop Test Scenarios...




                  User
                                      Service
                 Stories


   Agile Development


                                       Test
                                     Scenarios



                           Behavior Driven Development




                                                         25
You Implement Service and Test..




                  User
                                      Service
                 Stories


   Agile Development


                                       Test
                                     Scenarios



                           Behavior Driven Development




                                                         26
Your User Starts Using the API..



                                               REST Level 1-3 API


                   User
                                       Service              User
                  Stories


    Agile Development


                                        Test
                                      Scenarios



                            Behavior Driven Development
                                                                    Right?
                                                                             27
Your User Starts Using the API..



                                               REST Level 1-3 API


                   User
                                       Service              User
                  Stories


    Agile Development


                                        Test
                                      Scenarios



                            Behavior Driven Development
                                                                    NOT
                                                                          28
Level 4: Define User Activities From User Stories


                   User
                 Activities




                   User
                  Stories


    Agile Development




                                                   29
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
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
What About Those Behavior Trees...?


Game AI?
                                      Alex Champandard



AI GameDev Understanding Behavior Trees
http://aigamedev.com/open/article/bt-overview/




                                                         32
MODIS Behavior Tree for FloodMap

                                         Goal
                    Floodmap




                                            Activities
             GET                 GET
             TILE              PRODUCT




                                                         33
EO-1 Behavior Tree for FloodMap

                                  Floodmap




                                              PROCESS
                         TASK                FLOODMAP    GET
                        ASSET                ALGORITHM   DATA




            GET                 SUBMIT
        FEASIBILITIES            TASK




                                                                34
RADARSAT-2 Behavior Tree for FloodMap

                                  Floodmap




                         TASK                PROCESS   GET
                        ASSET                  DATA    DATA




            GET                 SUBMIT
        FEASIBILITIES            TASK




                                                              35
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
How To Define Behavior Trees...
                                 Tree GUI




 Ruby DSL (Radial)




           JavaScript



                                        37
Unexpected Benefit Of API Layer Level 5
What’s Under The Cloud Does Not Matter As Much




                                   REST Level 3
    SOAP

                 REST/RPC
                                                  38
Credits...

                               jmettraux/ruote-fluo
                               maryrosecook/machinejs
                               FaceBook OpenGraph Team
Mike Amundsen Benjamin Young   Stu Charlton




                                              Check His Keynote




http://www.restfest.org/
                                                                  39
API Level 5




THANK YOU
Pat Cappelaere
email: pat at cappelaere.com
twitter: @cappelaere
blog: http://blog.geobliki.com
web: http://www.vightel.com
github: github.com/cappelaere
linkedin: www.linkedin.com/pub/pat-cappelaere/0/163/236



                                                                        40

Mais conteúdo relacionado

Destaque

Diuit API Overview
Diuit API OverviewDiuit API Overview
Diuit API OverviewTing-Yi Lee
 
DODN2009 - Architecting Modern Distributed Applications
DODN2009 - Architecting Modern Distributed ApplicationsDODN2009 - Architecting Modern Distributed Applications
DODN2009 - Architecting Modern Distributed ApplicationsClint Edmonson
 
Apigility – Lightning Fast API Development - OSSCamp 2014
Apigility – Lightning Fast API Development - OSSCamp 2014 Apigility – Lightning Fast API Development - OSSCamp 2014
Apigility – Lightning Fast API Development - OSSCamp 2014 OSSCube
 
Zend\Expressive - höher, schneller, weiter
Zend\Expressive - höher, schneller, weiterZend\Expressive - höher, schneller, weiter
Zend\Expressive - höher, schneller, weiterRalf Eggert
 
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)James Titcumb
 
Creating an API with Expressive
Creating an API with ExpressiveCreating an API with Expressive
Creating an API with ExpressiveElton Minetto
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesArun Gupta
 
Rest api 테스트 수행가이드
Rest api 테스트 수행가이드Rest api 테스트 수행가이드
Rest api 테스트 수행가이드SangIn Choung
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding RESTNitin Pande
 
RESTful API 제대로 만들기
RESTful API 제대로 만들기RESTful API 제대로 만들기
RESTful API 제대로 만들기Juwon Kim
 

Destaque (12)

Diuit API Overview
Diuit API OverviewDiuit API Overview
Diuit API Overview
 
DODN2009 - Architecting Modern Distributed Applications
DODN2009 - Architecting Modern Distributed ApplicationsDODN2009 - Architecting Modern Distributed Applications
DODN2009 - Architecting Modern Distributed Applications
 
Rest Beer v2
Rest Beer v2Rest Beer v2
Rest Beer v2
 
Apigility – Lightning Fast API Development - OSSCamp 2014
Apigility – Lightning Fast API Development - OSSCamp 2014 Apigility – Lightning Fast API Development - OSSCamp 2014
Apigility – Lightning Fast API Development - OSSCamp 2014
 
Zend\Expressive - höher, schneller, weiter
Zend\Expressive - höher, schneller, weiterZend\Expressive - höher, schneller, weiter
Zend\Expressive - höher, schneller, weiter
 
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
 
Creating an API with Expressive
Creating an API with ExpressiveCreating an API with Expressive
Creating an API with Expressive
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web Services
 
Rest api 테스트 수행가이드
Rest api 테스트 수행가이드Rest api 테스트 수행가이드
Rest api 테스트 수행가이드
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding REST
 
RESTful API 제대로 만들기
RESTful API 제대로 만들기RESTful API 제대로 만들기
RESTful API 제대로 만들기
 
reveal.js 3.0.0
reveal.js 3.0.0reveal.js 3.0.0
reveal.js 3.0.0
 

Mais de Pat Cappelaere

Open Geo-Social API (and Screencast)
Open Geo-Social API (and Screencast)Open Geo-Social API (and Screencast)
Open Geo-Social API (and Screencast)Pat Cappelaere
 
GEOSS Future Products & GeoSocial API
GEOSS Future Products & GeoSocial APIGEOSS Future Products & GeoSocial API
GEOSS Future Products & GeoSocial APIPat Cappelaere
 
Is It API Time For A New Strategy?
Is It API Time For A New Strategy?Is It API Time For A New Strategy?
Is It API Time For A New Strategy?Pat Cappelaere
 
HyspIRI IPM Goes Social
HyspIRI IPM Goes SocialHyspIRI IPM Goes Social
HyspIRI IPM Goes SocialPat Cappelaere
 
Want Your API to Stick? Try Story-Telling...
Want Your API to Stick? Try Story-Telling...Want Your API to Stick? Try Story-Telling...
Want Your API to Stick? Try Story-Telling...Pat Cappelaere
 
RESTFul Services, Does it Matter Anymore?
RESTFul Services, Does it Matter Anymore?RESTFul Services, Does it Matter Anymore?
RESTFul Services, Does it Matter Anymore?Pat Cappelaere
 
Cathalac Story Based on Actual Data
Cathalac Story Based on Actual DataCathalac Story Based on Actual Data
Cathalac Story Based on Actual DataPat Cappelaere
 
Radarsat Facebook App Concept
Radarsat Facebook App ConceptRadarsat Facebook App Concept
Radarsat Facebook App ConceptPat Cappelaere
 
Story Telling as an Activity-based Architecture
Story Telling as an Activity-based ArchitectureStory Telling as an Activity-based Architecture
Story Telling as an Activity-based ArchitecturePat Cappelaere
 
Building Tomorrow's Web Services
Building Tomorrow's Web ServicesBuilding Tomorrow's Web Services
Building Tomorrow's Web ServicesPat Cappelaere
 
NASA SensorWeb Enterprise Services
NASA SensorWeb Enterprise ServicesNASA SensorWeb Enterprise Services
NASA SensorWeb Enterprise ServicesPat Cappelaere
 
Intelligent Payload Processing
Intelligent Payload ProcessingIntelligent Payload Processing
Intelligent Payload ProcessingPat Cappelaere
 
Restful Security Requirements
Restful Security RequirementsRestful Security Requirements
Restful Security RequirementsPat Cappelaere
 
Two Degrees To SensoWeb
Two Degrees To SensoWebTwo Degrees To SensoWeb
Two Degrees To SensoWebPat Cappelaere
 
EO/NRE Interoperability Presentation
EO/NRE Interoperability PresentationEO/NRE Interoperability Presentation
EO/NRE Interoperability PresentationPat Cappelaere
 

Mais de Pat Cappelaere (20)

GeoCAPE Strategies
GeoCAPE StrategiesGeoCAPE Strategies
GeoCAPE Strategies
 
Open Geo-Social API (and Screencast)
Open Geo-Social API (and Screencast)Open Geo-Social API (and Screencast)
Open Geo-Social API (and Screencast)
 
GEOSS Future Products & GeoSocial API
GEOSS Future Products & GeoSocial APIGEOSS Future Products & GeoSocial API
GEOSS Future Products & GeoSocial API
 
Is It API Time For A New Strategy?
Is It API Time For A New Strategy?Is It API Time For A New Strategy?
Is It API Time For A New Strategy?
 
HyspIRI IPM Goes Social
HyspIRI IPM Goes SocialHyspIRI IPM Goes Social
HyspIRI IPM Goes Social
 
Want Your API to Stick? Try Story-Telling...
Want Your API to Stick? Try Story-Telling...Want Your API to Stick? Try Story-Telling...
Want Your API to Stick? Try Story-Telling...
 
RESTFul Services, Does it Matter Anymore?
RESTFul Services, Does it Matter Anymore?RESTFul Services, Does it Matter Anymore?
RESTFul Services, Does it Matter Anymore?
 
Cathalac Story Based on Actual Data
Cathalac Story Based on Actual DataCathalac Story Based on Actual Data
Cathalac Story Based on Actual Data
 
Radarsat Facebook App Concept
Radarsat Facebook App ConceptRadarsat Facebook App Concept
Radarsat Facebook App Concept
 
Story Telling as an Activity-based Architecture
Story Telling as an Activity-based ArchitectureStory Telling as an Activity-based Architecture
Story Telling as an Activity-based Architecture
 
Building Tomorrow's Web Services
Building Tomorrow's Web ServicesBuilding Tomorrow's Web Services
Building Tomorrow's Web Services
 
NASA SensorWeb Enterprise Services
NASA SensorWeb Enterprise ServicesNASA SensorWeb Enterprise Services
NASA SensorWeb Enterprise Services
 
RIP
RIPRIP
RIP
 
Intelligent Payload Processing
Intelligent Payload ProcessingIntelligent Payload Processing
Intelligent Payload Processing
 
Restful Security Requirements
Restful Security RequirementsRestful Security Requirements
Restful Security Requirements
 
Two Degrees To SensoWeb
Two Degrees To SensoWebTwo Degrees To SensoWeb
Two Degrees To SensoWeb
 
Esip Jan 09
Esip Jan 09Esip Jan 09
Esip Jan 09
 
EO/NRE Interoperability Presentation
EO/NRE Interoperability PresentationEO/NRE Interoperability Presentation
EO/NRE Interoperability Presentation
 
A RESTful WfXML
A RESTful WfXMLA RESTful WfXML
A RESTful WfXML
 
RESTful OGC Services
RESTful OGC ServicesRESTful OGC Services
RESTful OGC Services
 

Último

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 

Último (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 

REST Level 5 - A Trek To The Summit

  • 1. Want To Make Your API Stick? Try Story Telling... REST API Level 5 Trek To The Summit Pat Cappelaere Software 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 Support RM-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 Centric Level 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 Products User Cares About Stories, Goals, Activities, Behaviors... 7
  • 8. Let’s Illustrate This With A Story... Port-Au-Prince Hawai Flooding 8
  • 9. User Response Goal Port-Au-Prince Hawai Flooding Get Floodmap Port-au-Prince 9
  • 10. Query Port-Au-Prince Hawai Flooding Get Floodmap Port-au-Prince Send Query Available Modis Radarsat EO-1 Services 10
  • 11. Get Available Behaviors Port-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-Prince Port-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
  • 17. Level 5: Define Behaviors • Not Unlike Behavior Driven Development We Are Taking About Behaviors We Can Discover And Execute On-Demand On The Client-Side 17
  • 18. Encoding Behavior... Hierarchical Finite State Machines Many 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 ✔ ✔ Activity Execute 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 Champandard AI GameDev Understanding Behavior Trees http://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 5 What’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 Team Mike Amundsen Benjamin Young Stu Charlton Check His Keynote http://www.restfest.org/ 39
  • 40. API Level 5 THANK YOU Pat Cappelaere email: pat at cappelaere.com twitter: @cappelaere blog: http://blog.geobliki.com web: http://www.vightel.com github: github.com/cappelaere linkedin: www.linkedin.com/pub/pat-cappelaere/0/163/236 40

Notas do Editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n