OpenGraph


    http://www.esipfed.org/




RESTFul Services, Does It Really Matter Anymore?
Pat Cappelaere




                              ESIP Information Technology & Interoperability Rant & Rave...

                              Building Tomorrow’s Social Web Apps
                                                                                  Oct 4th, 2012   1
Web Services Evolution

• 1990 REST/RPC


• 2005-2010 SOA (SOAP WS-* Stack)


• 2010- ROA (REST + HyperMedia)


  • Is Richardson Maturity Level 3 The Final Goal?




                                                     2
Richardson Maturity Level 3

• Resources & HTTP Verbs (GET/POST/PUT/DELETE)


• Stateless


• Caching


• Code on Demand


• Hypermedia Controls (Hypertext As The Engine Of Application State HATEOAS)


• Discoverability & Self-Documentation



          We Are Still Getting It Wrong!
                                                                               3
Facebook Anybody?




                    4
What’s Happening?

• Welcome To The Social Web


  • Users Like To Share Their Actions On The Web


  • Other Users Are Actually Interested In Those Activities


  • They May Actually Start Changing Their Behaviours Based On What Their
    Friends Are Doing




                                                                            5
The Other Thing


Tomorrow’s Primary Users
of Your Web Site Will Not
Be Humans


        Forget about a web page interface...
        User-agents will be primary users of your app...   6
How Could This Apply To Us?




                view                     task



                               process
                       model




                                                7
Or This?

                                           CATHALAC
                                                                         Disaster Management
                                                                             Belize Group
                                                                   member

                              Stu
                                       know
                                                                                  Story

                                                  Emil                                                                        Comments


                                    know

                       task                                                                    GSFC       Development
                                                                            Science            MSO
                                                                                                         Pat                Applications

                                            download                            Petya                                      Antonio



       Hypercube
                                                                  process
                                                                                          create
                                                                                                                  create



                                                                                           WCPS        WCPS
                                                                                          Algorithm   Unmixing
                                                                                                      Algorithm
    spatial indexing
                                                       Products
                                                                                                                                           8
How Can We Define User Activities?

• {User} {Verb} {Object} [{Target}]




                                      9
Activity Streams = Activity Output




    Protocol Already Exists

              http://activitystrea.ms/




                                         10
How Can We Publish/Discover Activity Potential?


     We Are Talking About Activities That
          Have Not Happened Yet

      We Are Talking About Web Applications
      That Provide Capabilities That Result In
                     Activities




                                                  11
Issues

• Define Object Types


• Define Actions or Verbs Types


  • Action Verbs & Action Links (linking Actions / Activities)

   What About Constraints?




                 Welcome To The Social Semantic Web!
                                                                 12
OGC Activities Examples

 {user | system} {acquired} {observation}

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

 {user} {is viewing} {an observation | map | product | …}

 {user} {likes} {observation}

 {user} {processed} {observation}

 {user} {executed} {algorithm} {observation}

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

 {user} {ordered} {imagery product}

 {user} {requested feasibility) {location}

 {user} {requested imaging) {location}

 {user} {collaborates with} {user}
                                                                         13
Linked Data and Semantic Web

• Facebook Open Graph Protocol


• Google Social Graph (Google+)


• dc, schema.org, UMBEL, FOAF, Cyc...




  We Need Our Own Open Graph API To Link Our Data, Verbs, Action Links...


       We Need A Shared Ontology (or Common Vocabulary)
                                                                            14
Next Problem: Representation

• RDF

• HTML5 + RDFa

   • JSON+LD

   • JSON-Schema, Siren...

• RDFa or RDFa-lite

• Microformats, Microdata

• RIF (Rule Interchange Format)...




                                     15
Getting to REST Level 4


                           Level 4: Activities




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

                                                                                    16
Object                                Target
 User Story
• User downloads Radarsat2 Floodmap of Haiti (and recommends it)


• or may be processed it and published it

                                                                                                   verbs
• Activity appears in Timeline


• Many Other friends see it (Facebook Page) and start doing it as well


• -> and it goes viral from there...

                                                                            Activity appears in
                                    Activity appears in
        Scientist “publishes”                                               News Feed of Many
                                         Timeline
                                                                                  Friends




                                Many friend scientists see the post and start collaborating


                                                                                                  Social Science?
                                                                                                               17
18
Meta Tag Sample: Floodmap


<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#
                radarsat: http://ogp.me/ns/fb/radarsat#">

 <meta   property="fb:app_id"   content="174581479345038" />
 <meta   property="og:type"     content="radarsat:floodmap" />
 <meta   property="og:url"      content="Put your own URL to the object here" />
 <meta   property="og:title"    content="Sample Floodmap" />
 <meta   property="og:image"    content="https://fbcdn.net/images/devsite/img.png" />




                                                                                        19
Take Away

Linked Data in Web Apps


For Tomorrow’s Users (Not Human)


Using Activity and Action Links Within a Semantic Web


and Social Networks


                                                        Thank You
                                                          Pat Cappelaere
                                                     pat@cappelaere.com
                                                    http://www.vightel.com



                                                                             20

RESTFul Services, Does it Matter Anymore?

  • 1.
    OpenGraph http://www.esipfed.org/ RESTFul Services, Does It Really Matter Anymore? Pat Cappelaere ESIP Information Technology & Interoperability Rant & Rave... Building Tomorrow’s Social Web Apps Oct 4th, 2012 1
  • 2.
    Web Services Evolution •1990 REST/RPC • 2005-2010 SOA (SOAP WS-* Stack) • 2010- ROA (REST + HyperMedia) • Is Richardson Maturity Level 3 The Final Goal? 2
  • 3.
    Richardson Maturity Level3 • Resources & HTTP Verbs (GET/POST/PUT/DELETE) • Stateless • Caching • Code on Demand • Hypermedia Controls (Hypertext As The Engine Of Application State HATEOAS) • Discoverability & Self-Documentation We Are Still Getting It Wrong! 3
  • 4.
  • 5.
    What’s Happening? • WelcomeTo The Social Web • Users Like To Share Their Actions On The Web • Other Users Are Actually Interested In Those Activities • They May Actually Start Changing Their Behaviours Based On What Their Friends Are Doing 5
  • 6.
    The Other Thing Tomorrow’sPrimary Users of Your Web Site Will Not Be Humans Forget about a web page interface... User-agents will be primary users of your app... 6
  • 7.
    How Could ThisApply To Us? view task process model 7
  • 8.
    Or This? CATHALAC Disaster Management Belize Group member Stu know Story Emil Comments know task GSFC Development Science MSO Pat Applications download Petya Antonio Hypercube process create create WCPS WCPS Algorithm Unmixing Algorithm spatial indexing Products 8
  • 9.
    How Can WeDefine User Activities? • {User} {Verb} {Object} [{Target}] 9
  • 10.
    Activity Streams =Activity Output Protocol Already Exists http://activitystrea.ms/ 10
  • 11.
    How Can WePublish/Discover Activity Potential? We Are Talking About Activities That Have Not Happened Yet We Are Talking About Web Applications That Provide Capabilities That Result In Activities 11
  • 12.
    Issues • Define ObjectTypes • Define Actions or Verbs Types • Action Verbs & Action Links (linking Actions / Activities) What About Constraints? Welcome To The Social Semantic Web! 12
  • 13.
    OGC Activities Examples {user | system} {acquired} {observation} {user} {searches for} {observations | products | maps | features | …} {user} {is viewing} {an observation | map | product | …} {user} {likes} {observation} {user} {processed} {observation} {user} {executed} {algorithm} {observation} {user} {downloaded} {observations | products | map layer} {user} {ordered} {imagery product} {user} {requested feasibility) {location} {user} {requested imaging) {location} {user} {collaborates with} {user} 13
  • 14.
    Linked Data andSemantic Web • Facebook Open Graph Protocol • Google Social Graph (Google+) • dc, schema.org, UMBEL, FOAF, Cyc... We Need Our Own Open Graph API To Link Our Data, Verbs, Action Links... We Need A Shared Ontology (or Common Vocabulary) 14
  • 15.
    Next Problem: Representation •RDF • HTML5 + RDFa • JSON+LD • JSON-Schema, Siren... • RDFa or RDFa-lite • Microformats, Microdata • RIF (Rule Interchange Format)... 15
  • 16.
    Getting to RESTLevel 4 Level 4: Activities http://martinfowler.com/articles/richardsonMaturityModel.html 16
  • 17.
    Object Target User Story • User downloads Radarsat2 Floodmap of Haiti (and recommends it) • or may be processed it and published it verbs • Activity appears in Timeline • Many Other friends see it (Facebook Page) and start doing it as well • -> and it goes viral from there... Activity appears in Activity appears in Scientist “publishes” News Feed of Many Timeline Friends Many friend scientists see the post and start collaborating Social Science? 17
  • 18.
  • 19.
    Meta Tag Sample:Floodmap <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# radarsat: http://ogp.me/ns/fb/radarsat#"> <meta property="fb:app_id" content="174581479345038" /> <meta property="og:type" content="radarsat:floodmap" /> <meta property="og:url" content="Put your own URL to the object here" /> <meta property="og:title" content="Sample Floodmap" /> <meta property="og:image" content="https://fbcdn.net/images/devsite/img.png" /> 19
  • 20.
    Take Away Linked Datain Web Apps For Tomorrow’s Users (Not Human) Using Activity and Action Links Within a Semantic Web and Social Networks Thank You Pat Cappelaere pat@cappelaere.com http://www.vightel.com 20