Enabling Automatic Discovery and Querying of Web APIs at Web Scale using LD Standards F. Michel, C. Faron-Zucker, O. Corby, F. Gandon Wimmics* joint research team (Univ. Côte d’Azur, Inria, CNRS, I3S, France ) Linked Data on the Web and its Relationship with Distributed Ledgers (LDOW/LDDL) 13 May, 2019 - San Francisco, USA Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France * AI in bridging social semantics and formal semantics on the Web 1
CKAN Whom to ask to discover datasets? LODAtlas SPARQL ProgrammableWeb Endpoints voiD store Status Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 2
No perfect discovery solution Restricted scope (topic, format, API…) Limited relevance of results Need to query multiple resources, Keyword-based: many irrelevant results. accommodate disparate interfaces, Metadata-based: just a first step in the mash up results selection process. No detailed insight into the data Manual dataset/service registration What resources? Outdated metadata What properties? Deprecated services What relationships? Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 3
3 principles to achieve automatic discovery and consumption of datasets at Web scale 1. Leverage Web search engines Harvest data portals, exploit structured markup 2. Rich description of dataset/query services Machine-readable, beyond simple metadata 3. Rely on well-adopted (simple) standards Need for consensus on technologies and practices Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 4
The SPARQL Micro-Service Architecture Lightweight method to query a Web API with SPARQL , and assign dereferenceable URIs to Web API resources S PARQL (1) SPARQL Client query S PARQL (2) Web API (4) SPARQL query Micro-Service response (3) Web API response Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 5
A SPARQL µ-service is a CONFIGURABLE SPARQL endpoint whose ARGUMENTS delineate the graph being queried. Endpoint : http://hostname/flickr/getPhotosByTag?tag=bridge SELECT * WHERE { ?photo a schema:Photograph; schema:name ?title; schema:contentUrl ?img. } Endpoint : http://hostname/flickr/getPhotosByTag SELECT * WHERE { ?photo a schema:Photograph; schema:keywords "bridge"; schema:name ?title; schema:contentUrl ?img. } Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 6
Example: search photos by tag using Flickr’s Web API SELECT * WHERE { ?photo a schema:Photograph; schema:keywords "bridge"; schema:name ?title; schema:contentUrl ?img. } S PARQL "bridge" µ-service http://example.org/flickr/ r/ge getPh tPhotos otosByTag ag/ Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 7
Machine-readable description of a dataset and its SPARQL micro-service Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 8
SPARQL Service Description as the framework SPARQL SD document ht http tp:// //exampl ple.org/f /flickr/ r/getP tPho hotosByTag/ Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 9
Metadata about the dataset and micro-service SPARQL SD document ht http tp:// //exampl ple.org/f /flickr/ r/getP tPho hotosByTag/ Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 10
Specification of the graphs produced by the µ-service Goal: give insight into the data, so SPARQL SD document applications can decide whether ht http tp:// //exampl ple.org/f /flickr/ r/getP tPho hotosByTag/ the service is relevant for their goal Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 11
Specification of the graphs produced by the µ-service Goal: give insight into the data, so SPARQL SD document applications can decide whether ht http tp:// //exampl ple.org/f /flickr/ r/getP tPho hotosByTag/ the service is relevant for their goal ht http tp:// //exampl ple.or org/f /flickr/ r/ge getP tPho hotos osByTag/Sh /Shape pesGraph Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 12
Description of the data source and µ-service arguments SPARQL SD document ht http tp:// //exampl ple.org/f /flickr/ r/getP tPho hotosByTag/ Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 13
Description of the data source and µ-service arguments SPARQL SD document ht http tp:// //exampl ple.org/f /flickr/ r/getP tPho hotosByTag/ SELECT * WHERE { ?photo a schema:Photograph; schema:keywords "bridge"; schema:name ?title; schema:contentUrl ?img. } Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 14
Description of the data source and µ-service arguments SPARQL SD document ht http tp:// //exampl ple.org/f /flickr/ r/getP tPho hotosByTag/ SELECT * WHERE { ?photo a schema:Photograph; schema:keywords "bridge"; schema:name ?title; schema:contentUrl ?img. } Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 15
SPARQL micro-service invocation Shapes graph A single SPARQL query reasons upon - the Service Description graph, - the Shapes graph, SPARQL SD SPARQL graph - the input query, SPARQL to extract the µ-service arguments query (SPIN) Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 16
Discover a SPARQL micro-service using web search engines Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 17
Discovery using search engines requires a web page </> HTML Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 18
Discovery using search engines requires a web page </> HTML schema.org Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 19
Web-scale discovery of SPARQL µ-services STTL* SPARQL </> SD HTML JDON-LD schema.org *STTL: SPARQL Template Transformation Language http://ns.inria.fr/sparql-template/ Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 20
Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 21
< WRAP-UP > Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 22
The global picture </> HTML SPARQL SD (1) JDON-LD graph Shapes graph SPARQL engine SPARQL micro-service Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 23
The global picture </> HTML SPARQL SD (1) JDON-LD graph Shapes graph SPARQL engine SPARQL micro-service Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 24
The global picture </> HTML SPARQL SD (1) JDON-LD graph (2) Shapes search graph LD-based SPARQL engine application SPARQL micro-service Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 25
The global picture </> HTML SPARQL SD (1) JDON-LD graph (2) Shapes search (3) fetch graph LD-based SPARQL engine application SPARQL micro-service Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 26
The global picture </> HTML SPARQL SD (1) JDON-LD graph (5) (2) Web API Shapes search (3) fetch graph LD-based SPARQL engine application (4) SPARQL query SPARQL micro-service Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 27
3 principles to achieve automatic discovery and consumption of SPARQL micro-services at Web scale 1. Leverage Web search engines Machine-readable description to web page + Schema.org/DCAT markup data 2. Rich description of dataset/query services Metadata, SHACL, Schema.org, Hydra 3. Rely on well-adopted (simple) standards SPARQL SD, SHACL, Schema.org/DCAT Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 28
Perspectives Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 29
Perspectives Demonstrate the whole chain An application seeks to answer a query / achieve a goal: - Discovers candidate services using search engines - Selects relevant services based on SD/Shapes graphs - Computes & enacts valid compositions Extend SPARQL federated query engines - Reason on SPARQL µ-services descriptions - Query plan respecting services’ inputs Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 30
Perspectives Schema.org unpractical to denote dataset interfaces (API , endpoint…) - WebAPI type extensions (EntryPoint) - Convergence with DCAT 1.2 DataService Google Dataset Search more effective than generic web search engines: more dataset search engines in the future? Three principles, many potential architectural/modelling choices in different contexts Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 31
Thank-you Ci Citatio ion: F. Michel, C. Faron-Zucker, O. Corby & F. Gandon. Ena nablin ing Auto utomatic ic Dis iscover ery and nd Query ueryin ing of of Web eb APIs s at Web Scale le us usin ing Linked Data Sta tandards. In Companion Proceedings of the 2019 World Wide Web Conference (WWW ’19 Companion), 2019, San Francisco, CA, USA. https://github.com/frmichel/sparql-micro-service https://hub.docker.com/u/frmichel Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France 32
Recommend
More recommend