Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Building Tomorrow's Web Services
1. Building Tomorrow’s Web Services API
Pat Cappelaere
REST Fest 2012
The Day After...
Sept 16, 2012
2. Web Service API Evolution
• 1990 HTTP REST Richardson Maturity Level 0/1
• 2000 Service Oriented Architecture (SOAP, WS-*)
• 2010 REST Oriented Architecture
• Level Richardson Maturity Level 2/3 -> Caching and HyperMedia
I Think That We Are Still Heading In Wrong Direction
• Next: 2015-2020??? Richardson Maturity Level 4?
3. Why?
•Users Do Not Care About Your Resource Model
Stop CRUD
•Users May Not Care About Your Link Relations Between
Resources
This is Your Own Plumbing
It May Still Be Necessary But...
•Tomorrow’s Users Of Your API Will Not Be Humans
SO LONG REST AND HYPERMEDIA...??
5. What’s Different With a User-Agent?
• Has Low Bandwidth - Think 3G-4G - 1MB is a big/costly chunk
• Acts on Behalf of User
• Performs One or More Activities to Achieve a User Goal
• Needs to be Able to Find Relevant Activities That Could Be Performed By
Nearby Server(s)
6. How Does A User-Agent Work?
• Goal (/Preferences) Directed
• Sensing
• Reactive / Effective
• Can Be Programmed To Act “Intelligently”
• See Constrained Behavior Trees (Game AI) With Blackboard ... Executing A
Specific Activity For Current Context and User Goal
Goal: Enabling User Agents By Publishing The
Possible Activities They Could Perform
7. http://activitystrea.ms/specs/json/1.0/
What’s An Activity (Stream)?
• Get/Post/Update/Delete A Document
• or better... Execute/Halt/Resume/Delete a Local Process or Workflow
• Examples:
• Facebook Social Activity Stream aka News Feed
• OGC
• Process Image (WPS)
• Task Satellite (SPS)
• Get Observation (SOS), a Map (WMS), a Coverage (WCS), a Feature
(WFS)...
http://www.socialcast.com/activity-streams
8. Activity Properties
• [User]
• Verb
https://raw.github.com/activitystreams/activity-streams-verb-definition/master/activity-streams-verb-definition.txt
• Object
• Target
• May be a Few More for Advanced/Complex Activities...
• Location, Duration, Cost, Priority, Date, TimeSpan...
{user} {verb} {object} [{target}]
9. From Activities To Activity Streams
• Once Actors Perform Many Activities, Activity Streams Can Be Generated
• See: http://activitystrea.ms/specs/json/1.0/
• Our Problem is to Provide an Activity Template for Actors to Perform
Activities (on Behalf of Users)
• And Make them Discoverable (Activity Discovery Document???)
• And Searchable by User Agents To Meet Current Needs (or Goals)
10. Activity Discovery Document?
User Agents Could Access It and Mine it
For Activity Opportunities... Then Follow
Links For Particular Activity Template
11. So...
• Support Auto-Discovery Of Relevant User-Agent Info
• Link to Activity Description Document in End Point Page Header
<link rel=‘activities’ href=‘http://www.example.com/activities’/>
• Link to Activity Search Document in End Point Page Header
<link rel="search"
href="http://example.com/opensearchdescription.xml"
type="application/opensearchdescription+xml"
title="Activity Search" />
• Support Activity Search (Described in Url Template of OpenSearch
Document) By Generic Search Terms or Specific Object/Verb Search
template="http://example.com/?q={searchTerms}&
objects={objectTerms}&verbs={verbs?}"/>
13. So Where Are We Going?
• 1990 HTTP REST Richardson Maturity Level 0/1
• 2000 Service Oriented Architecture (SOA)
• SOAP, WS-*
• 2010 REST Oriented Architecture (ROA)
• Level Richardson Maturity Level 2/3 -> Caching and HyperMedia
• Activity Oriented Architecture (AOA ?)
• Level 4?
14. Rationale
• Once We Have An Activity-Oriented Architecture, We Ought To Be Able to
Link Data and Actions
• See Stu Charlton’s REST FEST Presentation
• https://github.com/RESTFest/2012-greenville/blob/master/
presentation/linking%20data%20actions.pdf
15. Minor Problems
• Expressing Domain Specific Object/Verbs Semantics
• Users do not like to express semantics
• Example:
• User wants to get a floodmap of Haiti (Activity)
• But what’s a floodmap?
• Note: There is also a huge difference between a MODIS floodmap at
250m resolution and Radarsat-2 floodmap at 4m resolution... Does it
matter? There is/could be some big differences as well (data size,
generation time and $$)... Hummmm!
• Need Activity Aggregator ASAP ??
• PubsubHubbub?
16. Feedback?
• pat@cappelaere.com
Major Thanks To:
REST FEST 2012
https://github.com/RESTFest/2012-greenville/wiki/People
Activity Streams Group
https://groups.google.com/forum/?fromgroups#!forum/activity-streams
API-Craft Group
https://groups.google.com/forum/?fromgroups#!forum/api-craft
OGC REST Standards Working Group
NASA SensorWeb Group