Information Sciences InstituteRapidly Integrating Services into the Linked                 Data Cloud         Mohsen Taher...
dbpedia.org              2
Not in   dbpedia.orgCurrent temperature   73°FWindHumidity                      10 mph SW                      51%        ...
Not in   dbpedia.orgCurrent temperature   73°FWind                  10 mph SWHumidity              51%Dew Point           ...
Not in             dbpedia.orgCurrent temperature   73°FWind                  10 mph SWHumidity              51%Dew Point ...
The information is                                           available in Web APIsCurrent temperature   73°FWind          ...
Web APIs                      7000 APIs: growth all times versus last year                                                ...
The Problem RDF                                  RDFAPI Invocation                 JSON/XML                               ...
Motivation Example                For most of the Web APIs, only a textual description is available                       ...
Motivation Example                For most of the Web APIs, only a textual description is available              Most of t...
Outline• Rapidly Integrating APIs with the LD  – Building API Semantic Model  – Representing API Descriptions  – Building ...
Outline• Rapidly Integrating APIs with the LD  – Building API Semantic Model  – Representing API Descriptions  – Building ...
The Semantic Model            wgs84                      lat                           fcode                       nearb  ...
The Semantic Model            wgs84                        lat                           fcode                       nearb...
Semi-Automatically Modeling APIs                                Invoking                                APIsExamples of   ...
Invoking APIs• User provides examples of the API request URLs• Karma extracts the input values from the sample request URL...
Annotating Inputs and Outputs                          [Goel, Knoblock, Lerman, 2012] • A CRF-based model to assign a Sema...
Extracting Relationships                               [Knoblock et al., ESWC 2012]• Construct a graph from semantic types...
Extracting Relationships                               [Knoblock et al., ESWC 2012]• Construct a graph from semantic types...
API Semantic Model in Karma                              21
Outline• Rapidly Integrating APIs with the LD  – Building API Semantic Model  – Representing API Descriptions  – Building ...
Service Modeling Ontology                                                                      km:hasName       km:hasMand...
Example: Service Descriptionatom1                                                         .../neighbourhood?lat={p1}&...  ...
Service Discovery • Find services that return the neighbor feature   given the latitude and longitudeSELECT ?s WHERE {   ?...
Outline• Rapidly Integrating APIs with the LD  – Building API Semantic Model  – Representing API Descriptions  – Building ...
Invoking Linked APIs (POST)                                  RDF                    lowering   HTTP POST                  ...
Lowering:inputModel a km:Model;                         <http://sws.geonames.org/5145067/>   km:hasAtom                   ...
Lifting:out_countryCode a km:Attribute;               <geonames>                                                          ...
Outline• Rapidly Integrating APIs with the LD  – Building API Semantic Model  – Representing API Descriptions  – Building ...
EvaluationGeonames API                      #Examples   #Columns   Time (min)neighbourhood                         3      ...
Related Work• Linked Services [Pedrinaci & Domingue, 2010]   – Annotates inputs and outputs by concepts from     ontologie...
Related Work• Linked Services [Pedrinaci & Domingue, 2010]   – Annotates inputs and outputs by concepts from     ontologie...
Discussion• Rapidly build rich semantic models of services• Publish service descriptions into the LD cloud• Provide strong...
Future Work• Apply our approach on REST-like URLs   – http://www.ex.com/weather/CA/Los Angeles• Compose data and services ...
More Information• More information/papers/software/demos:  – http://www.isi.edu/integration/karma/• Contact  – Mohsen Tahe...
Upcoming SlideShare
Loading in …5
×

Rapidly Integrating Services into the Linked Data Cloud

821 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
821
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • 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)
  • 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.
  • 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.
  • 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
  • @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; .
  • datasets of this paper:http://isi.edu/integration/karma/data/iswc2012
  • 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
  • Rapidly Integrating Services into the Linked Data Cloud

    1. 1. Information Sciences InstituteRapidly 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
    2. 2. dbpedia.org 2
    3. 3. Not in dbpedia.orgCurrent temperature 73°FWindHumidity 10 mph SW 51% Live weatherDew Point 54° 3
    4. 4. Not in dbpedia.orgCurrent temperature 73°FWind 10 mph SWHumidity 51%Dew Point 54°Events Transparent Cities 5/1/2012 REDCAT EventsTheater Saving Our Sons : A CommunityConversatio… … 4
    5. 5. Not in dbpedia.orgCurrent temperature 73°FWind 10 mph SWHumidity 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. 6. The information is available in Web APIsCurrent temperature 73°FWind 10 mph SWHumidity 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. 7. Web APIs 7000 APIs: growth all times versus last year API Growth, 08/23/2012 2011 2012 65 RDF (Oct 2012) JSON XMLAPI Protocols, 02/10/2012 API Data Formats, 03/08/2011 7
    8. 8. The Problem RDF RDFAPI Invocation JSON/XML 8
    9. 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. 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. 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. 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. 13. The Semantic Model wgs84 lat fcode nearb geonames y neighbour long SpatialThing FeatureSubClassData Property parentFeatureObject 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. 14. The Semantic Model wgs84 lat fcode nearb geonames y neighbour long SpatialThing FeatureSubClassData Property parentFeatureObject 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. 15. Semi-Automatically Modeling APIs Invoking APIsExamples of AnnotatingAPI Request URLs Karma Attributes Previous Modeling Work on Modeling Extracting Static Domain Relationships Sources Ontology API Semantic Model 16
    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. 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. 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 parentCountrywgs84:lat gn:name Feature Featurewgs84:longgn:countryCode Feature Feature gn:name gn:name
    19. 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 parentCountrywgs84:lat neighbour gn:name Feature Featurewgs84:long nearbygn:countryCode Feature Feature parentCountry gn:name gn:name
    20. 20. API Semantic Model in Karma 21
    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. 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:Atomrest: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. 23. Example: Service Descriptionatom1 .../neighbourhood?lat={p1}&... GET neighbourhood v1 hasMethod hasAddress hasName atom5 km:Service http://<karma server>/services/ km:Outputatom2 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:namep1 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. 24. Service Discovery • Find services that return the neighbor feature given the latitude and longitudeSELECT ?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. 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. 26. Invoking Linked APIs (POST) RDF lowering HTTP POST /services/{id} Invocation URL lifting RDF XML/JSON 30
    27. 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. 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. 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. 30. EvaluationGeonames API #Examples #Columns Time (min)neighbourhood 3 10 6neighbours 2 9 5children 2 10 3sibling 1 9 3ocean 2 3 1findNearby 3 11 3findNearbyPostalCodes 3 11 7findNearbyPOIsOSM 3 7 3findNearestAddress 3 14 6findNearestIntersectionOSM 3 8 3postalCodeCountryInfo 1 5 2Total 26 97 42 Average 4 minutes to build a linked API 35
    31. 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. 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. 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. 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. 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

    ×