SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Information Sciences Institute




Rapidly Integrating Services into the Linked
                 Data Cloud

         Mohsen Taheriyan, Craig Knoblock,
          Pedro Szekely, Jose Luis Ambite



    11th International Semantic Web Conference (ISWC 2012)
                          Boston, USA
dbpedia.org




              2
Not in   dbpedia.org




Current temperature   73°F
Wind
Humidity
                      10 mph SW
                      51%
                                  Live weather
Dew Point             54°




                                                                3
Not in   dbpedia.org




Current temperature   73°F
Wind                  10 mph SW
Humidity              51%
Dew Point             54°
Events                Transparent Cities 5/1/2012 REDCAT
                                                               Events
Theater
                      Saving Our Sons : A Community
Conversatio…
                      …



                                                                             4
Not in             dbpedia.org




Current temperature   73°F
Wind                  10 mph SW
Humidity              51%
Dew Point             54°
Events                Transparent Cities 5/1/2012 REDCAT Theater
                      Saving Our Sons : A Community Conversatio…
                      …
Twitter Feed          Los Angeles becomes the largest U.S. city to ban..
                      Plastic grocery bags will now be banned in …         Live Twitter Feed
                      …

                                                                                               5
The information is
                                           available in Web APIs




Current temperature   73°F
Wind                  10 mph SW
Humidity              51%
Dew Point             54°
Events                Transparent Cities 5/1/2012 REDCAT Theater
                      Saving Our Sons : A Community Conversatio…
                      …
Twitter Feed          Los Angeles becomes the largest U.S. city to ban..
                      Plastic grocery bags will now be banned in …
                      …


                                                                           6
Web APIs

                      7000 APIs: growth all times versus last year




                                                                                API Growth, 08/23/2012
                                                                     2011    2012

                                                                                     65 RDF
                                                                                    (Oct 2012)


                                                JSON                                XML



API Protocols, 02/10/2012
                                                     API Data Formats, 03/08/2011



                                                                                                         7
The Problem


 RDF                                  RDF




API Invocation                 JSON/XML


                                            8
Motivation Example

                For most of the Web APIs, only a textual description is available



                                                      neighbourhood?
RDF Input




            <http://sws.geonames.org/5145067/>
               a gn:Feature ;
               wgs84:lat "40.78343" ;
               wgs84:long "-73.96625" .




                                 Invocation Example




                                                                                    9
Motivation Example

                For most of the Web APIs, only a textual description is available

              Most of the Web APIs do not consume or produce linked data (RDF)

                                                      <http://sws.geonames.org/5145067/>
RDF Input




            <http://sws.geonames.org/5145067/>




                                                                                                   Linked RDF
                                                        gn:neighbour [
               a gn:Feature ;
                                                          a gn:Feature ; gn:name "Woodside";
               wgs84:lat "40.78343" ;
                                                          gn:nearby [
               wgs84:long "-73.96625" .
                                                              a gn:Feature ; gn:name “…-Queens";
                                                              gn:parentCountry [ …
                           Lowering
                                                                            Lifting



                                 Invocation Example




                                                                                XML Response
                                                                                                          10
Outline

• Rapidly Integrating APIs with the LD
  – Building API Semantic Model
  – Representing API Descriptions
  – Building Linked APIs
• Evaluation
• Related Work
• Conclusion & Future Work
Outline

• Rapidly Integrating APIs with the LD
  – Building API Semantic Model
  – Representing API Descriptions
  – Building Linked APIs
• Evaluation
• Related Work
• Conclusion & Future Work
The Semantic Model
            wgs84                      lat                           fcode                       nearb
            geonames                                                                             y
                                                                                                 neighbour
                                    long        SpatialThing                  Feature
SubClass
Data Property                                                                                    parentFeature
Object Property                       alt                         countryCode      name          parentCountry



   http://api.geonames.org/neighbourhood?
   lat=40.78343&lng=-73.96625&username=demo

   wgs84:lat      wgs84:long
                                                          <geonames>

 Feature                  Feature                               <neighbourhood>
                                              gn:name
           gn:neighbour                                             <name>Central Park</name>
                          gn:nearby
                                               gn:name
                                                                    <city>New York City-Manhattan</city>
                                                                    <countryCode>US</countryCode>
                           Feature
                                             gn:countryCode         <countryName>United States</countryName>
                       gn:parentCountry               gn:name   </neighbourhood>
                                                          </geonames>
                                            Feature
                                                                                                             14
The Semantic Model
            wgs84                        lat                           fcode                       nearb
            geonames                                                                               y
                                                                                                   neighbour
                                    long          SpatialThing                  Feature
SubClass
Data Property                                                                                      parentFeature
Object Property                         alt                         countryCode      name          parentCountry



   http://api.geonames.org/neighbourhood?
   lat=40.78343&lng=-73.96625&username=demo

   wgs84:lat      wgs84:long
                                    v2                      <geonames>

 Feature                  Feature                                 <neighbourhood>
                                                gn:name
           gn:neighbour                                               <name>Central Park</name>
   v1                       gn:nearby
                                                 gn:name
                                                                      <city>New York City-Manhattan</city>
                                                                      <countryCode>US</countryCode>
                       v3    Feature
                                               gn:countryCode         <countryName>United States</countryName>
                        gn:parentCountry                gn:name   </neighbourhood>
                                                            </geonames>
                                              Feature
                                        v4                                                                     15
Semi-Automatically Modeling APIs


                                Invoking
                                APIs
Examples of
                                Annotating
API Request
  URLs
                   Karma        Attributes
                                                Previous
                  Modeling                      Work on
                                                Modeling
                                Extracting       Static
 Domain                         Relationships   Sources
 Ontology



                                      API
                                    Semantic
                                     Model
                                                      16
Invoking APIs

• User provides examples of the API request URLs
• Karma extracts the input values from the sample request URLs
• Karma invokes the API and extracts the output attributes from the
  API response (XML/JSON)

         Examples of API
                               Input Attributes   Output Attributes
         Invocation URLs




                                                                      17
Annotating Inputs and Outputs
                          [Goel, Knoblock, Lerman, 2012]

 • A CRF-based model to assign a Semantic Type to each
   column from its data
 • Semantic Type                   lat
                                        long  alt

      – Ontology Class                                        SpatialThing         nearb
                                                                                   y
      – Data Property + Domain                         name
                                                                                   neighbour

                                                                                   parentFeature
                                                                Feature
(wgs84:lat, gn:Feature)                                                            parentCountry
                                                     countryCode       fcode


                                                                 SubClass
                                                                 Data Property
                                                                 Object Property
                                                                             wgs84
                                                                             geonames



       (wgs84:long,
                                    (gn:name, gn:Feature)
        gn:Feature)

                  (gn:countryCode, gn:Feature)                                             18
Extracting Relationships
                               [Knoblock et al., ESWC 2012]


• Construct a graph from semantic types and ontology graph

• Select minimal tree that connects all semantic types
      – A customized Steiner tree algorithm


                                                                        nearby
                                         SpatialThing                   neighbour
                                                                        parentFeature
                                                                        parentCountry

wgs84:lat
                                                                               gn:name
                 Feature                                      Feature
wgs84:long




gn:countryCode
                     Feature                                  Feature
       gn:name                                                                 gn:name
Extracting Relationships
                               [Knoblock et al., ESWC 2012]


• Construct a graph from semantic types and ontology graph

• Select minimal tree that connects all semantic types
      – A customized Steiner tree algorithm


                                                                        nearby
                                         SpatialThing                   neighbour
                                                                        parentFeature
                                                                        parentCountry

wgs84:lat
                                          neighbour
                                                                               gn:name
                 Feature                                      Feature
wgs84:long

                                                                            nearby


gn:countryCode
                     Feature                                  Feature
                                           parentCountry
       gn:name                                                                 gn:name
API Semantic Model in Karma




                              21
Outline

• Rapidly Integrating APIs with the LD
  – Building API Semantic Model
  – Representing API Descriptions
  – Building Linked APIs
• Evaluation
• Related Work
• Conclusion & Future Work
Service Modeling Ontology

                                                                      km:hasName
       km:hasMandatoryAttribute
                                                       rest:isGroundedIn            km:Attribute            swrl:Variable
       km:hasOptionalAttribute
                                                               km:hasAttribute
                                                                                                argument1      argument2
                                                    km:Input
   km:hasName
                              km:hasInput

                     km:Service                         km:hasModel              km:Model                 swrl:Atom
rest:hasMethod                                                                               km:hasAtom
                             km:hasOutput

      rest:hasAddress                              km:Output

 SubClass                                                                                                 swrl:Individual
                                                                              swrl:ClassAtom              PropertyAtom
 SubProperty
 Data Property
 Object Property                                                          swrl:classPredicate         swrl:propertyPredicate
        rdfs:    http://www.w3.org/2000/01/rdf-schema#
        swrl:    http://www.w3.org/2003/11/swrl#
        rest:    http://purl.org/hRESTS/current#                                rdfs:Class                  rdf:Property
         km:     http://isi.edu/integration/karma/ontologies/model/current#



                                                                                                                           23
Example: Service Description

atom1                                                         .../neighbourhood?lat={p1}&...          GET          neighbourhood
  v1                                                                                   hasMethod
                                                                         hasAddress                    hasName
                                    atom5
                                                                  km:Service
                                                                  http://<karma server>/services/       km:Output
atom2




              atom3
                v2
                                                                  5C5CB6AB-1689-4A96-0B70-              output
                            atom4




                                                                  96C6A54F3D70#
                                                                                                    hasModel    hasAttribute
                                                           km:Input
                                                           input                         km:Model              km:Attribute
                                                                                         outputModel           out_name
                                            hasAttribute      hasModel                                                               name
                                                                                   hasAtom
                                                                                                         arg2
        lat
                                     km:Attribute                km:Model
                                                                 inputModel             swrl:PAtom       property       gn:name
p1                                   in_lat
                                                                                        atom4               arg1        swrl:Variable
                                                                         hasAtom
                                                    arg2                                                                v2
                      wgs84:lat                                                                          arg1
                                                                                        swrl:CAtom
                                               property
                                                            swrl:PAtom                  atom3                   class   gn:Feature
                      swrl:Variable              arg1       atom2                                        arg2
                      v1
                                                  arg1      swrl:CAtom                  swrl:PAtom                      gn:neighbour
                                                                                                         property
                      gn:Feature                 class      atom1                       atom5
                                                                                                         links the output to the input
                                                                      arg1                                 by neighbour relationship

                                                                                                                                        24
Service Discovery

 • Find services that return the neighbor feature
   given the latitude and longitude

SELECT ?s WHERE {
   ?s km:hasInput [km:hasAttribute ?i1, ?i2].
   ?s km:hasOutput [km:hasAttribute ?o1].
   ?s km:hasInput [km:hasModel [km:hasAtom
       [swrl:classPredicate gn:Feature; swrl:arg1 ?f1],
       [swrl:propertyPredicate wgs84:lat; swrl:arg1 ?f1; swrl:arg2 ?i1],
       [swrl:propertyPredicate wgs84:long; swrl:arg1 ?f1; swrl:arg2 ?i2]]].
   ?s km:hasOutput [km:hasModel [km:hasAtom
       [swrl:classPredicate gn:Feature; swrl:arg1 ?f2],
       [swrl:propertyPredicate gn:neighbour; swrl:arg1 ?f1; swrl:arg2 ?f2]]]}

                                                                          27
Outline

• Rapidly Integrating APIs with the LD
  – Building API Semantic Model
  – Representing API Descriptions
  – Building Linked APIs
• Evaluation
• Related Work
• Conclusion & Future Work
Invoking Linked APIs (POST)




                                  RDF
                    lowering   HTTP POST
                               /services/{id}
   Invocation URL


                    lifting      RDF
  XML/JSON




                                                30
Lowering

:inputModel a km:Model;                         <http://sws.geonames.org/5145067/>
   km:hasAtom                                      a gn:Feature ;
       [ a swrl:ClassAtom ;                        wgs84:lat "40.74538" ;
       swrl:argument1 :v1 ;                        wgs84:long "-73.90541" .
       swrl:classPredicate gn:Feature ] ;
   km:hasAtom                                                                Input Data (RDF)
       [ a swrl:IndividualPropertyAtom ;
       swrl:argument1 :v1 ;
                                                            Attribute         Value
       swrl:argument2 :in_lat ;
       swrl:propertyPredicate wgs84:lat ] ;                 in_lat            40.74538
   ...                                                      in_lng            -73.90541

:in_lat a km:Attribute;
    km:hasName "lat" ;                             Attribute         Value       GroundedIn
    hrests:isGroundedIn "p1“
...                                                in_lat            40.74538    p1
                                                   in_lng            -73.90541   p2
...
      hrests:hasAddress
      “http://api.geonames.org/neighbourhood?   http://api.geonames.org/neighbourhood?
      lat={p1}&lng={p2}”                        lat40.74538&lng=-73.90541
                                                                                 Invocation URL
            API Description (RDF)

                                                                                                31
Lifting

:out_countryCode a km:Attribute;               <geonames>




                                                                                                   API Response XML
    km:hasName “countryCode" ;                   <neighbourhood>
....                                                 <countryCode>US</countryCode>
                                                     <countryName>United States</countryName>
                                                     <city>New York City-Queens</city>
:outputModel a km:Model;                             <name>Woodside</name>
  km:hasAtom                                          ...
     [ a swrl:IndividualPropertyAtom ;           </neighbourhood>
     swrl:argument1 :v1 ;                      </geonames>
     swrl:argument2 :v2;
     swrl:propertyPredicate                      Attribute     Value           URI
     gn:neighbour ] ;
                                                 countryCode   US              :out_countryCode
  km:hasAtom
     [ a swrl:ClassAtom ;                        countryName   United States   :out_countryName
     swrl:argument1 :v2 ;                        city          ...-Queens      :out_city
     swrl:classPredicate gn:Feature ] ;
                                                 name          Woodside        :out_name
  km:hasAtom
     [ a swrl:IndividualPropertyAtom ;
                                                  <http://sws.geonames.org/5145067/>




                                                                                               Linked Output
     swrl:argument1 :v2 ;                           gn:neighbour [
     swrl:argument2 :out_name;                        a gn:Feature ; gn:name "Woodside";
     swrl:propertyPredicate gn:name ] ;                gn:nearby [
  …                                                       a gn:Feature ; gn:name “…-Queens";
                                                          gn:parentCountry [ …
       API Description (RDF)


                                                                                               33
Outline

• Rapidly Integrating APIs with the LD
  – Building API Semantic Model
  – Representing API Descriptions
  – Building Linked APIs
• Evaluation
• Related Work
• Conclusion & Future Work
Evaluation
Geonames API                      #Examples   #Columns   Time (min)
neighbourhood                         3          10           6
neighbours                            2           9           5
children                              2          10           3
sibling                               1           9           3
ocean                                 2           3           1
findNearby                            3           11          3
findNearbyPostalCodes                 3           11          7
findNearbyPOIsOSM                     3           7           3
findNearestAddress                    3          14           6
findNearestIntersectionOSM            3           8           3
postalCodeCountryInfo                 1           5           2
Total                                26          97          42

             Average 4 minutes to build a linked API
                                                                      35
Related Work

• Linked Services [Pedrinaci & Domingue, 2010]
   – Annotates inputs and outputs by concepts from
     ontologies
   – Publishes service descriptions into the LOD cloud using
     Minimal Service Model (MSM)
   – Cannot represent relationships between service
     attributes

• Linked Open Services (LOS) [Krummenacher & Norton & Marte, 2010]
  , Linked Data Services (LIDS) [Speiser & Harth, 2010]
   – SPARQL graph patterns to describe inputs and outputs
   – Service discovery is not straightforward

• RESTdesc [Verborgh et at, 2012]
   – N3 logical rules to capture API functionality
                                                                36
Related Work

• Linked Services [Pedrinaci & Domingue, 2010]
   – Annotates inputs and outputs by concepts from
     ontologies
   – Publishes service descriptions into the LOD cloud using
     Minimal Service Model (MSM)
      Karma semi-automatically builds service
   – Cannot represent relationships between service
     attributes
    descriptions and the modeling process does not
•   Linkedrequire expertise in SW technologies
           Open Services (LOS) [Krummenacher & Norton & Marte, 2010]
    , Linked Data Services (LIDS) [Speiser & Harth, 2010]
     – SPARQL graph patterns to describe inputs and outputs
     – Service discovery is not straightforward

• RESTdesc [Verborgh et at, 2012]
   – N3 logical rules to capture API functionality
                                                                  37
Discussion

• Rapidly build rich semantic models of services

• Publish service descriptions into the LD cloud

• Provide strong support for service discovery
  and composition

• Build linked APIs that consume and produce
  linked data


                                                   38
Future Work
• Apply our approach on REST-like URLs
   – http://www.ex.com/weather/CA/Los Angeles

• Compose data and services in Karma

 S1(address  street, city, state, zipcode,)   Composition
 S2(city, state temperature, windspeed, …)

 S3(zipcode, distance hotel, ranking)




                                                             39
More Information

• More information/papers/software/demos:
  – http://www.isi.edu/integration/karma/


• Contact
  – Mohsen Taheriyan: mohsen@isi.edu
  – Craig Knoblock: knoblock@isi.edu
  – Pedro Szekely: pszekely@isi.edu
  – Jose Luis Ambite: ambite@isi.edu


                                            40

Weitere ähnliche Inhalte

Ähnlich wie Rapidly Integrating Services into the Linked Data Cloud

Open innovation in software means Open Source (2011 remix)
Open innovation in software means Open Source (2011 remix)Open innovation in software means Open Source (2011 remix)
Open innovation in software means Open Source (2011 remix)Bertrand Delacretaz
 
Why we (Day) open source most of our code
Why we (Day) open source most of our codeWhy we (Day) open source most of our code
Why we (Day) open source most of our codeBertrand Delacretaz
 
Ibm_interconnect_restapi_workshop
Ibm_interconnect_restapi_workshopIbm_interconnect_restapi_workshop
Ibm_interconnect_restapi_workshopShubhra Kar
 
Aggregating Social Media for Enhancing Conference Experiences
Aggregating Social Media for Enhancing Conference ExperiencesAggregating Social Media for Enhancing Conference Experiences
Aggregating Social Media for Enhancing Conference ExperiencesHouda khrouf
 
RDF Stream Processing and the role of Semantics
RDF Stream Processing and the role of SemanticsRDF Stream Processing and the role of Semantics
RDF Stream Processing and the role of SemanticsJean-Paul Calbimonte
 
Getting started with entity framework revised 9 09
Getting started with entity framework revised 9 09Getting started with entity framework revised 9 09
Getting started with entity framework revised 9 09manisoft84
 
RubyMotion Inspect Conference - 2013. (Without speaker notes.)
RubyMotion Inspect Conference - 2013. (Without speaker notes.)RubyMotion Inspect Conference - 2013. (Without speaker notes.)
RubyMotion Inspect Conference - 2013. (Without speaker notes.)alloy020
 
10 Tips Every New Developer in Alfresco Should Know
10 Tips Every New Developer in Alfresco Should Know10 Tips Every New Developer in Alfresco Should Know
10 Tips Every New Developer in Alfresco Should KnowAngel Borroy López
 
GraphQL Will Do To REST What JSON Did To XML
GraphQL Will Do To REST What JSON Did To XMLGraphQL Will Do To REST What JSON Did To XML
GraphQL Will Do To REST What JSON Did To XMLRoy Derks
 
Connect js nodejs_api_shubhra
Connect js nodejs_api_shubhraConnect js nodejs_api_shubhra
Connect js nodejs_api_shubhraShubhra Kar
 
History and Background of the USEWOD Data Challenge
History and Background of the  USEWOD Data ChallengeHistory and Background of the  USEWOD Data Challenge
History and Background of the USEWOD Data ChallengeKnud Möller
 
A Provenance-Aware Linked Data Application for Trip Management and Organization
A Provenance-Aware Linked Data Application for Trip Management and OrganizationA Provenance-Aware Linked Data Application for Trip Management and Organization
A Provenance-Aware Linked Data Application for Trip Management and OrganizationBoris Villazón-Terrazas
 
[JS EXPERIENCE 2018] Os segredos dos pricipais frameworks JS: Vanilla.js - Ig...
[JS EXPERIENCE 2018] Os segredos dos pricipais frameworks JS: Vanilla.js - Ig...[JS EXPERIENCE 2018] Os segredos dos pricipais frameworks JS: Vanilla.js - Ig...
[JS EXPERIENCE 2018] Os segredos dos pricipais frameworks JS: Vanilla.js - Ig...iMasters
 
Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...
Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...
Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...Jesse Cravens
 
Towards social webtops using semantic wiki
Towards social webtops using semantic wikiTowards social webtops using semantic wiki
Towards social webtops using semantic wikiJie Bao
 
Realtime Analytics with MongoDB Counters (mongonyc 2012)
Realtime Analytics with MongoDB Counters (mongonyc 2012)Realtime Analytics with MongoDB Counters (mongonyc 2012)
Realtime Analytics with MongoDB Counters (mongonyc 2012)Scott Hernandez
 
LA RubyConf 2009 Waves And Resource-Oriented Architecture
LA RubyConf 2009 Waves And Resource-Oriented ArchitectureLA RubyConf 2009 Waves And Resource-Oriented Architecture
LA RubyConf 2009 Waves And Resource-Oriented ArchitectureDan Yoder
 
CSHALS 2010 W3C Semanic Web Tutorial
CSHALS 2010 W3C Semanic Web TutorialCSHALS 2010 W3C Semanic Web Tutorial
CSHALS 2010 W3C Semanic Web TutorialLeeFeigenbaum
 

Ähnlich wie Rapidly Integrating Services into the Linked Data Cloud (20)

Open innovation in software means Open Source (2011 remix)
Open innovation in software means Open Source (2011 remix)Open innovation in software means Open Source (2011 remix)
Open innovation in software means Open Source (2011 remix)
 
Why we (Day) open source most of our code
Why we (Day) open source most of our codeWhy we (Day) open source most of our code
Why we (Day) open source most of our code
 
Ibm_interconnect_restapi_workshop
Ibm_interconnect_restapi_workshopIbm_interconnect_restapi_workshop
Ibm_interconnect_restapi_workshop
 
A RESTful WfXML
A RESTful WfXMLA RESTful WfXML
A RESTful WfXML
 
Aggregating Social Media for Enhancing Conference Experiences
Aggregating Social Media for Enhancing Conference ExperiencesAggregating Social Media for Enhancing Conference Experiences
Aggregating Social Media for Enhancing Conference Experiences
 
RDF Stream Processing and the role of Semantics
RDF Stream Processing and the role of SemanticsRDF Stream Processing and the role of Semantics
RDF Stream Processing and the role of Semantics
 
Getting started with entity framework revised 9 09
Getting started with entity framework revised 9 09Getting started with entity framework revised 9 09
Getting started with entity framework revised 9 09
 
RubyMotion Inspect Conference - 2013. (Without speaker notes.)
RubyMotion Inspect Conference - 2013. (Without speaker notes.)RubyMotion Inspect Conference - 2013. (Without speaker notes.)
RubyMotion Inspect Conference - 2013. (Without speaker notes.)
 
10 Tips Every New Developer in Alfresco Should Know
10 Tips Every New Developer in Alfresco Should Know10 Tips Every New Developer in Alfresco Should Know
10 Tips Every New Developer in Alfresco Should Know
 
GraphQL Will Do To REST What JSON Did To XML
GraphQL Will Do To REST What JSON Did To XMLGraphQL Will Do To REST What JSON Did To XML
GraphQL Will Do To REST What JSON Did To XML
 
Connect js nodejs_api_shubhra
Connect js nodejs_api_shubhraConnect js nodejs_api_shubhra
Connect js nodejs_api_shubhra
 
History and Background of the USEWOD Data Challenge
History and Background of the  USEWOD Data ChallengeHistory and Background of the  USEWOD Data Challenge
History and Background of the USEWOD Data Challenge
 
A Provenance-Aware Linked Data Application for Trip Management and Organization
A Provenance-Aware Linked Data Application for Trip Management and OrganizationA Provenance-Aware Linked Data Application for Trip Management and Organization
A Provenance-Aware Linked Data Application for Trip Management and Organization
 
[JS EXPERIENCE 2018] Os segredos dos pricipais frameworks JS: Vanilla.js - Ig...
[JS EXPERIENCE 2018] Os segredos dos pricipais frameworks JS: Vanilla.js - Ig...[JS EXPERIENCE 2018] Os segredos dos pricipais frameworks JS: Vanilla.js - Ig...
[JS EXPERIENCE 2018] Os segredos dos pricipais frameworks JS: Vanilla.js - Ig...
 
Node.JS briefly introduced
Node.JS briefly introducedNode.JS briefly introduced
Node.JS briefly introduced
 
Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...
Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...
Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...
 
Towards social webtops using semantic wiki
Towards social webtops using semantic wikiTowards social webtops using semantic wiki
Towards social webtops using semantic wiki
 
Realtime Analytics with MongoDB Counters (mongonyc 2012)
Realtime Analytics with MongoDB Counters (mongonyc 2012)Realtime Analytics with MongoDB Counters (mongonyc 2012)
Realtime Analytics with MongoDB Counters (mongonyc 2012)
 
LA RubyConf 2009 Waves And Resource-Oriented Architecture
LA RubyConf 2009 Waves And Resource-Oriented ArchitectureLA RubyConf 2009 Waves And Resource-Oriented Architecture
LA RubyConf 2009 Waves And Resource-Oriented Architecture
 
CSHALS 2010 W3C Semanic Web Tutorial
CSHALS 2010 W3C Semanic Web TutorialCSHALS 2010 W3C Semanic Web Tutorial
CSHALS 2010 W3C Semanic Web Tutorial
 

Rapidly Integrating Services into the Linked Data Cloud

  • 1. Information Sciences Institute Rapidly Integrating Services into the Linked Data Cloud Mohsen Taheriyan, Craig Knoblock, Pedro Szekely, Jose Luis Ambite 11th International Semantic Web Conference (ISWC 2012) Boston, USA
  • 3. Not in dbpedia.org Current temperature 73°F Wind Humidity 10 mph SW 51% Live weather Dew Point 54° 3
  • 4. Not in dbpedia.org Current temperature 73°F Wind 10 mph SW Humidity 51% Dew Point 54° Events Transparent Cities 5/1/2012 REDCAT Events Theater Saving Our Sons : A Community Conversatio… … 4
  • 5. Not in dbpedia.org Current temperature 73°F Wind 10 mph SW Humidity 51% Dew Point 54° Events Transparent Cities 5/1/2012 REDCAT Theater Saving Our Sons : A Community Conversatio… … Twitter Feed Los Angeles becomes the largest U.S. city to ban.. Plastic grocery bags will now be banned in … Live Twitter Feed … 5
  • 6. The information is available in Web APIs Current temperature 73°F Wind 10 mph SW Humidity 51% Dew Point 54° Events Transparent Cities 5/1/2012 REDCAT Theater Saving Our Sons : A Community Conversatio… … Twitter Feed Los Angeles becomes the largest U.S. city to ban.. Plastic grocery bags will now be banned in … … 6
  • 7. Web APIs 7000 APIs: growth all times versus last year API Growth, 08/23/2012 2011 2012 65 RDF (Oct 2012) JSON XML API Protocols, 02/10/2012 API Data Formats, 03/08/2011 7
  • 8. The Problem RDF RDF API Invocation JSON/XML 8
  • 9. Motivation Example For most of the Web APIs, only a textual description is available neighbourhood? RDF Input <http://sws.geonames.org/5145067/> a gn:Feature ; wgs84:lat "40.78343" ; wgs84:long "-73.96625" . Invocation Example 9
  • 10. Motivation Example For most of the Web APIs, only a textual description is available Most of the Web APIs do not consume or produce linked data (RDF) <http://sws.geonames.org/5145067/> RDF Input <http://sws.geonames.org/5145067/> Linked RDF gn:neighbour [ a gn:Feature ; a gn:Feature ; gn:name "Woodside"; wgs84:lat "40.78343" ; gn:nearby [ wgs84:long "-73.96625" . a gn:Feature ; gn:name “…-Queens"; gn:parentCountry [ … Lowering Lifting Invocation Example XML Response 10
  • 11. Outline • Rapidly Integrating APIs with the LD – Building API Semantic Model – Representing API Descriptions – Building Linked APIs • Evaluation • Related Work • Conclusion & Future Work
  • 12. Outline • Rapidly Integrating APIs with the LD – Building API Semantic Model – Representing API Descriptions – Building Linked APIs • Evaluation • Related Work • Conclusion & Future Work
  • 13. The Semantic Model wgs84 lat fcode nearb geonames y neighbour long SpatialThing Feature SubClass Data Property parentFeature Object Property alt countryCode name parentCountry http://api.geonames.org/neighbourhood? lat=40.78343&lng=-73.96625&username=demo wgs84:lat wgs84:long <geonames> Feature Feature <neighbourhood> gn:name gn:neighbour <name>Central Park</name> gn:nearby gn:name <city>New York City-Manhattan</city> <countryCode>US</countryCode> Feature gn:countryCode <countryName>United States</countryName> gn:parentCountry gn:name </neighbourhood> </geonames> Feature 14
  • 14. The Semantic Model wgs84 lat fcode nearb geonames y neighbour long SpatialThing Feature SubClass Data Property parentFeature Object Property alt countryCode name parentCountry http://api.geonames.org/neighbourhood? lat=40.78343&lng=-73.96625&username=demo wgs84:lat wgs84:long v2 <geonames> Feature Feature <neighbourhood> gn:name gn:neighbour <name>Central Park</name> v1 gn:nearby gn:name <city>New York City-Manhattan</city> <countryCode>US</countryCode> v3 Feature gn:countryCode <countryName>United States</countryName> gn:parentCountry gn:name </neighbourhood> </geonames> Feature v4 15
  • 15. Semi-Automatically Modeling APIs Invoking APIs Examples of Annotating API Request URLs Karma Attributes Previous Modeling Work on Modeling Extracting Static Domain Relationships Sources Ontology API Semantic Model 16
  • 16. Invoking APIs • User provides examples of the API request URLs • Karma extracts the input values from the sample request URLs • Karma invokes the API and extracts the output attributes from the API response (XML/JSON) Examples of API Input Attributes Output Attributes Invocation URLs 17
  • 17. Annotating Inputs and Outputs [Goel, Knoblock, Lerman, 2012] • A CRF-based model to assign a Semantic Type to each column from its data • Semantic Type lat long alt – Ontology Class SpatialThing nearb y – Data Property + Domain name neighbour parentFeature Feature (wgs84:lat, gn:Feature) parentCountry countryCode fcode SubClass Data Property Object Property wgs84 geonames (wgs84:long, (gn:name, gn:Feature) gn:Feature) (gn:countryCode, gn:Feature) 18
  • 18. Extracting Relationships [Knoblock et al., ESWC 2012] • Construct a graph from semantic types and ontology graph • Select minimal tree that connects all semantic types – A customized Steiner tree algorithm nearby SpatialThing neighbour parentFeature parentCountry wgs84:lat gn:name Feature Feature wgs84:long gn:countryCode Feature Feature gn:name gn:name
  • 19. Extracting Relationships [Knoblock et al., ESWC 2012] • Construct a graph from semantic types and ontology graph • Select minimal tree that connects all semantic types – A customized Steiner tree algorithm nearby SpatialThing neighbour parentFeature parentCountry wgs84:lat neighbour gn:name Feature Feature wgs84:long nearby gn:countryCode Feature Feature parentCountry gn:name gn:name
  • 20. API Semantic Model in Karma 21
  • 21. Outline • Rapidly Integrating APIs with the LD – Building API Semantic Model – Representing API Descriptions – Building Linked APIs • Evaluation • Related Work • Conclusion & Future Work
  • 22. Service Modeling Ontology km:hasName km:hasMandatoryAttribute rest:isGroundedIn km:Attribute swrl:Variable km:hasOptionalAttribute km:hasAttribute argument1 argument2 km:Input km:hasName km:hasInput km:Service km:hasModel km:Model swrl:Atom rest:hasMethod km:hasAtom km:hasOutput rest:hasAddress km:Output SubClass swrl:Individual swrl:ClassAtom PropertyAtom SubProperty Data Property Object Property swrl:classPredicate swrl:propertyPredicate rdfs: http://www.w3.org/2000/01/rdf-schema# swrl: http://www.w3.org/2003/11/swrl# rest: http://purl.org/hRESTS/current# rdfs:Class rdf:Property km: http://isi.edu/integration/karma/ontologies/model/current# 23
  • 23. Example: Service Description atom1 .../neighbourhood?lat={p1}&... GET neighbourhood v1 hasMethod hasAddress hasName atom5 km:Service http://<karma server>/services/ km:Output atom2 atom3 v2 5C5CB6AB-1689-4A96-0B70- output atom4 96C6A54F3D70# hasModel hasAttribute km:Input input km:Model km:Attribute outputModel out_name hasAttribute hasModel name hasAtom arg2 lat km:Attribute km:Model inputModel swrl:PAtom property gn:name p1 in_lat atom4 arg1 swrl:Variable hasAtom arg2 v2 wgs84:lat arg1 swrl:CAtom property swrl:PAtom atom3 class gn:Feature swrl:Variable arg1 atom2 arg2 v1 arg1 swrl:CAtom swrl:PAtom gn:neighbour property gn:Feature class atom1 atom5 links the output to the input arg1 by neighbour relationship 24
  • 24. Service Discovery • Find services that return the neighbor feature given the latitude and longitude SELECT ?s WHERE { ?s km:hasInput [km:hasAttribute ?i1, ?i2]. ?s km:hasOutput [km:hasAttribute ?o1]. ?s km:hasInput [km:hasModel [km:hasAtom [swrl:classPredicate gn:Feature; swrl:arg1 ?f1], [swrl:propertyPredicate wgs84:lat; swrl:arg1 ?f1; swrl:arg2 ?i1], [swrl:propertyPredicate wgs84:long; swrl:arg1 ?f1; swrl:arg2 ?i2]]]. ?s km:hasOutput [km:hasModel [km:hasAtom [swrl:classPredicate gn:Feature; swrl:arg1 ?f2], [swrl:propertyPredicate gn:neighbour; swrl:arg1 ?f1; swrl:arg2 ?f2]]]} 27
  • 25. Outline • Rapidly Integrating APIs with the LD – Building API Semantic Model – Representing API Descriptions – Building Linked APIs • Evaluation • Related Work • Conclusion & Future Work
  • 26. Invoking Linked APIs (POST) RDF lowering HTTP POST /services/{id} Invocation URL lifting RDF XML/JSON 30
  • 27. Lowering :inputModel a km:Model; <http://sws.geonames.org/5145067/> km:hasAtom a gn:Feature ; [ a swrl:ClassAtom ; wgs84:lat "40.74538" ; swrl:argument1 :v1 ; wgs84:long "-73.90541" . swrl:classPredicate gn:Feature ] ; km:hasAtom Input Data (RDF) [ a swrl:IndividualPropertyAtom ; swrl:argument1 :v1 ; Attribute Value swrl:argument2 :in_lat ; swrl:propertyPredicate wgs84:lat ] ; in_lat 40.74538 ... in_lng -73.90541 :in_lat a km:Attribute; km:hasName "lat" ; Attribute Value GroundedIn hrests:isGroundedIn "p1“ ... in_lat 40.74538 p1 in_lng -73.90541 p2 ... hrests:hasAddress “http://api.geonames.org/neighbourhood? http://api.geonames.org/neighbourhood? lat={p1}&lng={p2}” lat40.74538&lng=-73.90541 Invocation URL API Description (RDF) 31
  • 28. Lifting :out_countryCode a km:Attribute; <geonames> API Response XML km:hasName “countryCode" ; <neighbourhood> .... <countryCode>US</countryCode> <countryName>United States</countryName> <city>New York City-Queens</city> :outputModel a km:Model; <name>Woodside</name> km:hasAtom ... [ a swrl:IndividualPropertyAtom ; </neighbourhood> swrl:argument1 :v1 ; </geonames> swrl:argument2 :v2; swrl:propertyPredicate Attribute Value URI gn:neighbour ] ; countryCode US :out_countryCode km:hasAtom [ a swrl:ClassAtom ; countryName United States :out_countryName swrl:argument1 :v2 ; city ...-Queens :out_city swrl:classPredicate gn:Feature ] ; name Woodside :out_name km:hasAtom [ a swrl:IndividualPropertyAtom ; <http://sws.geonames.org/5145067/> Linked Output swrl:argument1 :v2 ; gn:neighbour [ swrl:argument2 :out_name; a gn:Feature ; gn:name "Woodside"; swrl:propertyPredicate gn:name ] ; gn:nearby [ … a gn:Feature ; gn:name “…-Queens"; gn:parentCountry [ … API Description (RDF) 33
  • 29. Outline • Rapidly Integrating APIs with the LD – Building API Semantic Model – Representing API Descriptions – Building Linked APIs • Evaluation • Related Work • Conclusion & Future Work
  • 30. Evaluation Geonames API #Examples #Columns Time (min) neighbourhood 3 10 6 neighbours 2 9 5 children 2 10 3 sibling 1 9 3 ocean 2 3 1 findNearby 3 11 3 findNearbyPostalCodes 3 11 7 findNearbyPOIsOSM 3 7 3 findNearestAddress 3 14 6 findNearestIntersectionOSM 3 8 3 postalCodeCountryInfo 1 5 2 Total 26 97 42 Average 4 minutes to build a linked API 35
  • 31. Related Work • Linked Services [Pedrinaci & Domingue, 2010] – Annotates inputs and outputs by concepts from ontologies – Publishes service descriptions into the LOD cloud using Minimal Service Model (MSM) – Cannot represent relationships between service attributes • Linked Open Services (LOS) [Krummenacher & Norton & Marte, 2010] , Linked Data Services (LIDS) [Speiser & Harth, 2010] – SPARQL graph patterns to describe inputs and outputs – Service discovery is not straightforward • RESTdesc [Verborgh et at, 2012] – N3 logical rules to capture API functionality 36
  • 32. Related Work • Linked Services [Pedrinaci & Domingue, 2010] – Annotates inputs and outputs by concepts from ontologies – Publishes service descriptions into the LOD cloud using Minimal Service Model (MSM) Karma semi-automatically builds service – Cannot represent relationships between service attributes descriptions and the modeling process does not • Linkedrequire expertise in SW technologies Open Services (LOS) [Krummenacher & Norton & Marte, 2010] , Linked Data Services (LIDS) [Speiser & Harth, 2010] – SPARQL graph patterns to describe inputs and outputs – Service discovery is not straightforward • RESTdesc [Verborgh et at, 2012] – N3 logical rules to capture API functionality 37
  • 33. Discussion • Rapidly build rich semantic models of services • Publish service descriptions into the LD cloud • Provide strong support for service discovery and composition • Build linked APIs that consume and produce linked data 38
  • 34. Future Work • Apply our approach on REST-like URLs – http://www.ex.com/weather/CA/Los Angeles • Compose data and services in Karma S1(address  street, city, state, zipcode,) Composition S2(city, state temperature, windspeed, …) S3(zipcode, distance hotel, ranking) 39
  • 35. More Information • More information/papers/software/demos: – http://www.isi.edu/integration/karma/ • Contact – Mohsen Taheriyan: mohsen@isi.edu – Craig Knoblock: knoblock@isi.edu – Pedro Szekely: pszekely@isi.edu – Jose Luis Ambite: ambite@isi.edu 40

Hinweis der Redaktion

  1. http://blog.programmableweb.com/2012/08/23/7000-apis-twice-as-many-as-this-time-last-year/http://www.bogotobogo.com/WebTechnologies/OpenAPI_RESTful.phphttp://www.webmonkey.com/2011/03/thousand-of-apis-paint-a-bright-future-for-the-web/Only 69 APIs use RDF as data format (According to Programmable Web API Directory, Oct 20, 2012)Not all data sources will be published as fully materialized datasetsReasonsData is changing constantly (e.g., sensor data, stock quotes)Data is calculated based on infinitely many inputs (e.g., route between two geographical locations)Provider does not want arbitrary access (e.g., flight ticket prices, social networks)
  2. Steiner minimal tree (SMT) G=(V,E) , S  V, c: E  (S: Steiner Nodes)Shortest network connecting vertices of SApproximation Alg. [Kou &amp; Markowsky, 1981]O(|V|2|S|) , Approximation Ratio: less than 2Approximation ratio bounded by 2(1 − 1/l), where l is the number of leaves in the optimal Steiner tree.
  3. Steiner minimal tree (SMT) G=(V,E) , S  V, c: E  (S: Steiner Nodes)Shortest network connecting vertices of SApproximation Alg. [Kou &amp; Markowsky, 1981]O(|V|2|S|) , Approximation Ratio: less than 2Approximation ratio bounded by 2(1 − 1/l), where l is the number of leaves in the optimal Steiner tree.
  4. A simple RDF vocabulary that represents both syntax and semantic of APIsKarma automatically generates service descriptions and stores them in a triple store called Linked API RepositoryService descriptions can be published into the Linked Data cloud
  5. @prefix : &lt;http://&lt;karma server&gt;/services/5C5CB6AB-1689-4A96-0B70-96C6A54F3D70#&gt; . @prefix gn: &lt;http://www.geonames.org/ontology#&gt; .@prefix wgs84: &lt;http://www.w3.org/2003/01/geo/wgs84#&gt; .
  6. datasets of this paper:http://isi.edu/integration/karma/data/iswc2012
  7. In the second step, instead of selecting MST ((v1, v4) – (v1, v2)- (v2-v3)), if we select another MST like ((v1, v4) – (v1, v2)- (v1-v3)), we would get another Steiner tree as result.MST = Minimum Spanning Tree