open geosocial api

29
A Open Geo-Social REST API For The Web Lessons Learned From the EO-1 Spacecraft, 12 Years Later... Jan 1, 2013 1 Or Could We Say? Stories Building the Next Generation Of Web Services Using Story-Telling. The Way For Users To Get Information From The Programmable Web...

Upload: pat-cappelaere

Post on 25-Dec-2014

2.434 views

Category:

Documents


4 download

DESCRIPTION

A Social Approach to API Design

TRANSCRIPT

Page 1: Open GeoSocial API

A Open Geo-Social REST API For The WebLessons Learned From the EO-1 Spacecraft, 12 Years Later... Jan 1, 2013

1

Or Could We Say? Stories

Building the Next Generation Of Web Services Using Story-Telling.The Way For Users To Get Information From The Programmable Web...

Page 2: Open GeoSocial API

Programmable Web Problem

# api’s

http://www.programmableweb.com/

This Is Becoming an Enormous Issue for Our Neo-GeographersToo Complex... Too Much Coding...Too Little Time...

Page 3: Open GeoSocial API

Our Geo-API Reality, Today!Get Floodmap...

Get Flood Forecast...Floods - Port-Au-Prince, Haiti

60+ standardsat different version levels

3+ binding types400+ Organizations

Disaster

3

Page 4: Open GeoSocial API

Before EO-1 EO-1 (Launched on Nov 21, 2000)

• Upload Individual Command Sequences

• Execute Command List

• Upload A Goal

• Execute the Goal

• Satellite Generates Its Own Command Sequences Based on Current Resource Availability and Context

• Now We Can Say: Image Port-Au-Prince, Haiti... and we get it.

Manual, Complex, Time-Consuming, Expensive

Port-au-Prince, Haiti

4

Page 5: Open GeoSocial API

EO-1 Wideband Advanced Recorder/Processor vs IPhone 5

Mongoose 5 Processor32 bit, 12 MHz6 GB Storage3 GB Memory23 kg

A6 Chip32 bit, 1.3 GHz64 GB Storage1 GB Memory112 g, $400

5We Have Made Some Progress Since 2001...

Page 6: Open GeoSocial API

Programming The [Geo-]Web Today...

• If You Want A FloodMap...• Interface to EO-1 Sensor Planning Service... Get Feasibilities, Submit Task• Interface to EO-1 Web Coverage Processing Service... Process FloodMap

Algorithm... Pan-sharpening Algorithm...• Interface to EO-1 Sensor Alert Service... Get Notification• Interface to EO-1 Sensor Observation Service... Get Data

• Repeat for Radarsat-2, MODIS (if you find them)... Use Catalog Service...• And These Services May Have Different Bindings... REST/RPC, SOAP,

GeoServices or REST...• Services May Have Particularities (To Task Radarsat-2, you may need to

specify beam mode, polarization... What is that?)

Manual, Complex, Time-Consuming, Expensive... Does Not Scale Up For Our Disaster Community.

6

Page 7: Open GeoSocial API

How Can We Reduce Complexity And Improve Access To Information?

Discovery, Harmonization & Interoperability Issues[OGC REST Standard Working Group]

7

Page 8: Open GeoSocial API

Standard User Media Types

Maps

StoriesRecipes

144 ch.8

and

Users Like Simple Directions and Stories.

Page 9: Open GeoSocial API

Donald Norman: Designing For People

The Design of Everyday Things. New York. 1986

9

http://www.jnd.org“Designers have to produce things that tame complexity.”

Stages of Execution:-

• Start at the top with the goal, the state that is to be achieved.

• The goal is translated into an intention to do some action.

• The intention must be translated into a set of internal commands, an action sequence that can be performed to satisfy the intention.

• The action sequence is still a mutual even: nothing happens until it is executed, performed upon the world.

Page 10: Open GeoSocial API

What If...Like EO-1...

• User Would Only State the Goal

• Services Would Figure Out What To Do and Return It To Client Some Directions or Simple Maps (or Simple Model to Follow)

• Client Would Execute As Code-On-Demand (Simple Javascript Running In Browser or Thin Client or SmartPhone App)

Get Floodmap...Get Flood Forecast...Floods - Port-Au-Prince, Haiti

Goal

10

Page 11: Open GeoSocial API

The Magick Sauce...• We define user goals (in our case floodmap or flood_forecast...)

• To achieve those goals, we define [geo-]activities (see examples next slide)

• A behavior is defined as a set of [geo-]activities required to meet a goal.

• A behavior is encoded in Javascript as a behavior tree

• Servers publish behaviors/activities they can perform. They return possible behaviors on query

• Simple Javascript library (or App) is provided to clients to execute returned behavior trees

• Activities are triggered on the client but executed on the server

• Results are returned back to the user as atom feed or notification

User can execute the behaviors to meet a goal without having to read a spec, implement an interfaces or workflow engine

11

Page 12: Open GeoSocial API

Geo-Activities Examples

{system} {publishes | harvests } {resources}

{system} {acquires} {observation}

{user} {searches for} {activities | observations | products | maps | features | …}

{user} {views} {an observation | map | product | …}

{user} {processes} {observation}

{user} {executes} {algorithm} {on an observation}

{user} {subscribes} {event}

{user} {downloaded} {observations | products | map layer}

{user} {requests feasibility) {location}

{user} {requests imaging) {location}

{user} {orders} {imagery product}

{user} {generates) {product}

{user} {likes | shares | comments } {observation | product}

{user} {collaborates with} {user}12

Page 13: Open GeoSocial API

Encoding Behavior...

HFSM

PlannersScripting

Workflows C++ LUA

Hierarchical Task Network Planners

Hierarchical Finite State Machines

BehaviorTrees

http://aigamedev.com/open/articles/behavior-trees-part1/

integratedflexible

intuitivereactive

autonomouspurposefule

http://aigamedev.com/open/articles/behavior-trees-part2/http://aigamedev.com/open/articles/behavior-trees-part3/

Many Options...

13

Alex Champandard

ExistingGame Technology

Page 14: Open GeoSocial API

A Simple PatternTo Model Behavior

Goal G

1+ 1!

- Execution Strategy Options: Parallel, Sequential or Select First Successful Branch Or Try Next Branch- Objects:

GoalTasks, ActionsFilters (conditions)

14

Start From Goal At The Top

Go Down The Tree Until Action

And Execute

Goal G:

Do Task1if condition1 -> A1Then A2

Next Branch,Do Task2if condition2 then A3done!.

do in parallel

A Behavior Tree

A1Cond1 Cond2

A2

A3

A4

Do All

Task1 Task2

Only One

Page 15: Open GeoSocial API

Behaviors As Code-on-demand

• Behaviors Can Be Encoded in Javascript

• Behaviors Can Be Sent To Client on Request Based On User Goal

• Client Can Execute Behaviors in Browser (Javascript) and Execute Activities On the Server Side By Following the Activity Links

• Smartphones... Tablets... and DeskTops...

• Activity Stories Propagate On Social Networks To Deliver Information and Enable Discovery

• NO Need for Workflow Engine, Finite State Model Engine, Planner or Compiler

15

There Are Some Differences From Game AI!

Page 16: Open GeoSocial API

Start From GOAL

✔✔ ✔1 1

Client Server

✔✔ ✔1 1

✔✔ ✔1 1

✔✔ ✔1 1

Goals

Burnscar

Floodmap

NDVI

Query

...

Get Floodmap Port-au-Prince

16

Page 17: Open GeoSocial API

Retrieve The Directions as a Tree

✔✔ ✔1 1

✔✔

1 1

Client Server

Goals

Get Burnscar

Get Floodmap

Get NDVI

17

Page 18: Open GeoSocial API

Follow the Directions

✔✔

1 1

Client Server

Activity

Execute Code-On-DemandOn-Client But...

ActivityActivityActivityHTTP POST

Resources

18

ActivityStream

Share, Like, Comment,

Collaborate...

Activities On Server Side

Page 19: Open GeoSocial API

Activities Appears In User Timeline and News Feed

19Now They Can be Shared (Discovered And Duplicated)

Page 20: Open GeoSocial API

20

Page 21: Open GeoSocial API

MODIS Behavior Tree for FloodMap

Floodmap

21

Goal

Activities

Example

Only 1 Test, 1 Activity1 OGC Service

GetProduct

Sensor Observation Service (SOS)

SOSTile Avail?

Page 22: Open GeoSocial API

RADARSAT-2 Behavior Tree for FloodMap

Floodmap

22

Example

More ComplexMight Need To Task Satellite

3 OGC ServicesSensor Planning Service (SPS)Web Processing Service (WPS)

Sensor Observation Service (SOS)Optional Sensor Alert Service (SAS)...

GETFEASIBILITIES

SUBMITTASK

GETProduct

ProcessData

TaskAssetSPS

WPS

SOS

Page 23: Open GeoSocial API

EO-1 Behavior Tree for FloodMap

Floodmap

23

Example

Then Need to Apply Special Algorithm...3 OGC Services

Sensor Planning ServiceWeb Coverage Processing Service

Sensor Observation Service

GETFEASIBILITIES

SUBMITTASK

TaskAsset

GetProduct

PROCESSFLOODMAPALGORITHMSPSWCPS

SOS

Page 24: Open GeoSocial API

Local User Tree For Floodmap (After Query)

Floodmap

MODIS EO-1 RADARSAT2Behavior Trees Retrieved

Dynamically

.. .. .. ..

24

Three Behavior (sub)Trees To Execute in Parallel (or Sequentially...)

Goal

Client

Server Web Services

User Activities

Page 25: Open GeoSocial API

Discovery Via Social Networks

ActivityActivityActivityActivity

Resources

ActivityStream

Share, Like, Comment,

Collaborate...

25

Behavior

Mimick

Page 26: Open GeoSocial API

Discovery Via Distributed Query

Client

Geo-Portals /Federated Catalog Lookups /

Super Aggregators

Query

Server

BehaviorsBehaviorsBehaviors

Publish

Feed

26

Page 27: Open GeoSocial API

Agile Development Process + Implementation

• Focus On User Stories (Goals)

• Then Develop Scenarios (Behaviors)

• Then Implement Service The Same Way

27

Publish Goals/Activities/BehaviorsAnd Generate Activity Streams

Same inside as outside!

NEW

Page 28: Open GeoSocial API

Value Proposition

• Use Story Telling To Convey Information to Access/Share The Information

• Define User Activities To Interface To Actual Services

• Define Behaviors To Achieve User Goals By Sequencing Activities

• Web Services Publish Behaviors On Request Based On User Goals

• Users Execute Behaviors To Meet Goals and Retrieve Products

• Friends Discover Information/Capabilities On Social Networks Via Stories (Activity Stream, Facebook, Twitter)

28

User Centric

User Cares About Stories, Goals, Activities, Behaviors...Not Services or Data

Page 29: Open GeoSocial API

A1 A2 A3ActivitiesRealm

S1 S2 S3ServicesRealm

BehaviorsRealm B1

A2

S1 S2

A3

S3

DataRealm

Information/GoalRealm

UserRealm

D1 D2 D3

GeoSpatial API

GeoSocial API

Today's API

Tomorrow's API

B2 B3

With Some ServiceOrchestration

ActivityOrchestration

G1 G1

A1

B2

NextGEN GeoSocial APIGoal Driven Behavior Tree

REST/RPC SOAP GeoServices

Activity Layer Independent of

Service Implementation

ServiceImplementation

OGC Service Standards

Get FloodmapFloods - Port-Au-Prince, Haiti

29

Server

Client