SlideShare a Scribd company logo
1 of 17
Download to read offline
1Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
F. Michel, C. Faron-Zucker, F. Gandon
Université Côte d’Azur, CNRS, Inria, I3S, France
SPARQL Micro-Services:
Lightweight Integration of Web APIs and Linked Data
11th International Workshop on Linked Data on the Web (LDOW)
April 23rd 2018, Lyon, France
2Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
Monolithic vs. Micro-services Architectures
User Interface
Business Layer
Data Layer
Monolithic Architecture Micro-services Architecture
User Interface
3Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
Micro-services Architecture(s)
a.k.a. fined-grained SOA, serverless architecture
Principle: decompose the app into multiple services
• Fine-grained: focused on a simple, unique function (minimal)
• Lightweight
• Loosely coupled (complete)
• Independently deployable
• Standard APIs, common ways of identifying resources (composable)
User Interface
Benefits
• Modularity: applications easier to test and deploy (continuous deployment)
• Elasticity: scale one micro-service up or down independently of other services (e.g. app containers)
• Language/technology freedom (polyglot application)
4Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
Can we leverage µ-service principles to design LD-based applications?
LD Application
URI
lookup
Link
traversalTriple
store
Query
expansion
SOLID
data
store
Authentication
5Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
Bridging Web APIs and Linked Data
LD-based application Several common issues to tackle:
• “REST-like” is not RESTful:
• standard formats (e.g. JSON, XML) but
proprietary vocabularies
• documented in web pages but not
machine-processable
• no hyperlinks
• Internal resource identifiers
• What appropriate interface:
LD document, REST (TPF, LDP), SPARQL?
6Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
The SPARQL Micro-services Architecture
http://getPhotosByTag.example.org/sparql?tags=bridge
https://api.flickr.com/services/rest?
method=flickr.photos.search&format=json&api_key=…&
tags=bridge
Sµ
ArgW
SW
ArgW
Sµ translates Sw‘s response into an RDF graph
and evaluates the SPARQL query against this graph.
Lightweight method to query a Web API with SPARQL, and
assign dereferenceable URIs to Web API resources
7Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
A SPARQL micro-service is a configurable SPARQL endpoint
whose arguments delineate the virtual graph that is being queried.
8Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
 Fine-grained (one API, one service at a time)
 Lightweight
 Loosely-coupled (complete s/w unit)
 Independently deployable (e.g. Docker)
 Standard API and resource naming
 Comply with standards
SPARQL query language and protocol
No extension needed
 Pay-as-you-go
Develop µ-services along with new arising needs
 Simplicity
Configuration-based provisioning
Hide Web API technicalities
Alignment with common/domain vocabularies
SPARQL Micro-services Characteristics
Sµ
ArgW
http://getPhotosByTag.example.org/sparql?tags=bridge
9Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
Alternative options to pass µ-service arguments
SELECT ?img WHERE {
SERVICE <http://hostname/flickr/getPhotosByGroupByTag>
{ ?photo foaf:depiction ?img.
<http://hostname/flickr/getPhotosByGroupByTag>
a api:Service; api:execution [
api:param [ api:name "group_id"; api:value "806927@N20" ];
api:param [ api:name "tags"; api:value ?tag ].
].
}}
SELECT ?img WHERE {
SERVICE <http://hostname/flickr/getPhotosByGroupByTag>
{ ?photo foaf:depiction ?img;
api:group_id "806927@N20";
api:tags "bridge".
}}
SELECT ?img WHERE {
SERVICE <http://hostname/flickr/getPhotosByGroupByTag>
{ ?photo foaf:depiction ?img.
BIND("806927@N20" AS ?group_id)
BIND("bridge" AS ?tags)
}}
 Arguments made explicit can be reused in the graph pattern.
 Create new terms for each µ-service.
 Terms possibly technical for which we do not want to define
ontological terms.
 Subject of these triples?
 Little new terms, possibly coming from existing ontologies
 Uniform manner to pass arguments.
 Additional triples with somewhat artificial semantics:
configure the service (how) but do not describe the
searched resources (what).
 No new terms needed.
 Simple and easy-to-read.
 Predefined variables with somewhat artificial semantics:
configure the service (how) but do not describe the
searched resources (what).
10Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
Prototype implementation for JSON-based Web APIs
SPARQL Client Service Logics Web API
JSON-LD
Profile
SPARQL
INSERT
HTTP
query
JSON
response
Triple
store
SPARQL Micro-Service
(1)
(4)
(2)
(3)
SPARQL query processing
https://github.com/frmichel/sparql-micro-service
https://hub.docker.com/u/frmichel
11Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
Prototype implementation for JSON-based Web APIs
Service Logics Web API
JSON-LD
Profile
SPARQL
CONSTRUCT
HTTP
query
JSON
response
Triple
store
SPARQL Micro-Service
LD Client Web Server
URI dereferencing
(1)
(6)
(3)
(4)
(2)
(5)
The URI is rewritten into an invocation of the appropriate
SPARQL micro-service that returns the result of a CONSTRUCT query.
The result is transparently proxied back to the client.
http://example.org/photo/472495
12Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
Evaluation: 2% to 4% overhead compared to direct Web API query
Biodiversity related use-case to retrieve:
 photos from Flickr,
 audio recordings from the Macauley Library,
 music tunes from MusicBrainz
Query execution time (in seconds) for individual SPARQL micro-services.
The last column is the overhead imposed by the SPARQL micro-service compared to a direct Web API query.
13Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
Impact of the SPARQL engine evaluation strategy
Independence of graph patterns:
Virtuoso OS follow the worst evaluation strategy
(https://github.com/openlink/virtuoso-opensource/issues/724).
Parallelism:
Virtuoso OS and Corese-KGRAM do not evaluate SERVICE clauses in parallel although they are
independent.
14Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
15Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
Richer, self-describing interface
Self-describing metadata
• Expected parameters, types of triples generated
• Paging mechanism
Follow the idea of Triple Pattern Fragments
• Self-describing, uniform interface: triple + metadata + hypermedia controls
• Allow navigate from one fragment (or page) to another
Is SPARQL the right type of interface?
• Embed metadata within SPARQL results (SELECT, ASK query forms)?
• Restrict SPARQL Query to CONSTRUCT and DESCRIBE query forms?
• Define a Graph Pattern Fragment interface?
16Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
General perspectives
Push forward the reflection about micro-services vs. LD-based apps
• other types of data sources
• other types of services
Most Web APIs provide R/W access
SPARQL Update micro-service to achieve R/W Web of Data?
17Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
https://github.com/frmichel/sparql-micro-service
https://hub.docker.com/u/frmichel
Citation:
Michel F., Faron-Zucker C. & Gandon F (2018). SPARQL Micro-Services:
Lightweight Integration of Web APIs and Linked Data. In Proceedings of
the Linked Data on the Web Workshop (LDOW2018). Lyon, France.

More Related Content

Similar to SPARQL Micro-Services: Lightweight Integration of Web APIs and Linked Data

OpenACC Monthly Highlights: January 2024
OpenACC Monthly Highlights: January 2024OpenACC Monthly Highlights: January 2024
OpenACC Monthly Highlights: January 2024OpenACC
 
OREChem Services and Workflows
OREChem Services and WorkflowsOREChem Services and Workflows
OREChem Services and Workflowsmarpierc
 
Ml based detection of users anomaly activities (20th OWASP Night Tokyo, English)
Ml based detection of users anomaly activities (20th OWASP Night Tokyo, English)Ml based detection of users anomaly activities (20th OWASP Night Tokyo, English)
Ml based detection of users anomaly activities (20th OWASP Night Tokyo, English)Yury Leonychev
 
Bridging Concepts and Practice in eScience via Simulation-driven Engineering
Bridging Concepts and Practice in eScience via Simulation-driven EngineeringBridging Concepts and Practice in eScience via Simulation-driven Engineering
Bridging Concepts and Practice in eScience via Simulation-driven EngineeringRafael Ferreira da Silva
 
Soa4 all technical achievements final
Soa4 all technical achievements finalSoa4 all technical achievements final
Soa4 all technical achievements finalJohn Domingue
 
A Library for Emerging High-Performance Computing Clusters
A Library for Emerging High-Performance Computing ClustersA Library for Emerging High-Performance Computing Clusters
A Library for Emerging High-Performance Computing ClustersIntel® Software
 
Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux Trayan Iliev
 
Runtime Behavior of JavaScript Programs
Runtime Behavior of JavaScript ProgramsRuntime Behavior of JavaScript Programs
Runtime Behavior of JavaScript ProgramsIRJET Journal
 
research Paper face recognition attendance system
research Paper face recognition attendance systemresearch Paper face recognition attendance system
research Paper face recognition attendance systemAnkitRao82
 
FAIR Computational Workflows
FAIR Computational WorkflowsFAIR Computational Workflows
FAIR Computational WorkflowsCarole Goble
 
Overview of the SPARQL-Generate language and latest developments
Overview of the SPARQL-Generate language and latest developmentsOverview of the SPARQL-Generate language and latest developments
Overview of the SPARQL-Generate language and latest developmentsMaxime Lefrançois
 
Towards Configuration Technologies for IoT Gateways
Towards Configuration Technologies  for IoT GatewaysTowards Configuration Technologies  for IoT Gateways
Towards Configuration Technologies for IoT GatewaysAGILE IoT
 
IRJET- Cross-Platform Supported E-Learning Mobile Application
IRJET- Cross-Platform Supported E-Learning Mobile ApplicationIRJET- Cross-Platform Supported E-Learning Mobile Application
IRJET- Cross-Platform Supported E-Learning Mobile ApplicationIRJET Journal
 
Co-evolving changes in a data-intensive software system
Co-evolving changes in a data-intensive software systemCo-evolving changes in a data-intensive software system
Co-evolving changes in a data-intensive software systemTom Mens
 
ITEA2-ModelWriter Project
ITEA2-ModelWriter ProjectITEA2-ModelWriter Project
ITEA2-ModelWriter ProjectFerhat Erata
 

Similar to SPARQL Micro-Services: Lightweight Integration of Web APIs and Linked Data (20)

OpenACC Monthly Highlights: January 2024
OpenACC Monthly Highlights: January 2024OpenACC Monthly Highlights: January 2024
OpenACC Monthly Highlights: January 2024
 
OREChem Services and Workflows
OREChem Services and WorkflowsOREChem Services and Workflows
OREChem Services and Workflows
 
Ml based detection of users anomaly activities (20th OWASP Night Tokyo, English)
Ml based detection of users anomaly activities (20th OWASP Night Tokyo, English)Ml based detection of users anomaly activities (20th OWASP Night Tokyo, English)
Ml based detection of users anomaly activities (20th OWASP Night Tokyo, English)
 
Bridging Concepts and Practice in eScience via Simulation-driven Engineering
Bridging Concepts and Practice in eScience via Simulation-driven EngineeringBridging Concepts and Practice in eScience via Simulation-driven Engineering
Bridging Concepts and Practice in eScience via Simulation-driven Engineering
 
Soa4 all technical achievements final
Soa4 all technical achievements finalSoa4 all technical achievements final
Soa4 all technical achievements final
 
sample-resume
sample-resumesample-resume
sample-resume
 
A Library for Emerging High-Performance Computing Clusters
A Library for Emerging High-Performance Computing ClustersA Library for Emerging High-Performance Computing Clusters
A Library for Emerging High-Performance Computing Clusters
 
Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux
 
Runtime Behavior of JavaScript Programs
Runtime Behavior of JavaScript ProgramsRuntime Behavior of JavaScript Programs
Runtime Behavior of JavaScript Programs
 
research Paper face recognition attendance system
research Paper face recognition attendance systemresearch Paper face recognition attendance system
research Paper face recognition attendance system
 
FAIR Computational Workflows
FAIR Computational WorkflowsFAIR Computational Workflows
FAIR Computational Workflows
 
2017 dagstuhl-nfv-rothenberg
2017 dagstuhl-nfv-rothenberg2017 dagstuhl-nfv-rothenberg
2017 dagstuhl-nfv-rothenberg
 
Overview of the SPARQL-Generate language and latest developments
Overview of the SPARQL-Generate language and latest developmentsOverview of the SPARQL-Generate language and latest developments
Overview of the SPARQL-Generate language and latest developments
 
Unit-3.pptx
Unit-3.pptxUnit-3.pptx
Unit-3.pptx
 
Towards Configuration Technologies for IoT Gateways
Towards Configuration Technologies  for IoT GatewaysTowards Configuration Technologies  for IoT Gateways
Towards Configuration Technologies for IoT Gateways
 
Srinivasan Rajappa
Srinivasan RajappaSrinivasan Rajappa
Srinivasan Rajappa
 
IRJET- Cross-Platform Supported E-Learning Mobile Application
IRJET- Cross-Platform Supported E-Learning Mobile ApplicationIRJET- Cross-Platform Supported E-Learning Mobile Application
IRJET- Cross-Platform Supported E-Learning Mobile Application
 
Co-evolving changes in a data-intensive software system
Co-evolving changes in a data-intensive software systemCo-evolving changes in a data-intensive software system
Co-evolving changes in a data-intensive software system
 
ITEA2-ModelWriter Project
ITEA2-ModelWriter ProjectITEA2-ModelWriter Project
ITEA2-ModelWriter Project
 
Closer17.ppt
Closer17.pptCloser17.ppt
Closer17.ppt
 

More from Franck Michel

ISSA: Generic Pipeline, Knowledge Model and Visualization tools to Help Scien...
ISSA: Generic Pipeline, Knowledge Model and Visualization tools to Help Scien...ISSA: Generic Pipeline, Knowledge Model and Visualization tools to Help Scien...
ISSA: Generic Pipeline, Knowledge Model and Visualization tools to Help Scien...Franck Michel
 
Bioschemas: Marking up biodiversity websites to improve data discovery and we...
Bioschemas: Marking up biodiversity websites to improve data discovery and we...Bioschemas: Marking up biodiversity websites to improve data discovery and we...
Bioschemas: Marking up biodiversity websites to improve data discovery and we...Franck Michel
 
Unleash the Potential of your Website! 180,000 webpages from the French NHM m...
Unleash the Potential of your Website! 180,000 webpages from the French NHM m...Unleash the Potential of your Website! 180,000 webpages from the French NHM m...
Unleash the Potential of your Website! 180,000 webpages from the French NHM m...Franck Michel
 
Describe and Publish data sets on the web: vocabularies, catalogues, data por...
Describe and Publish data sets on the web: vocabularies, catalogues, data por...Describe and Publish data sets on the web: vocabularies, catalogues, data por...
Describe and Publish data sets on the web: vocabularies, catalogues, data por...Franck Michel
 
Knowledge Engineering: Semantic web, web of data, linked data
Knowledge Engineering: Semantic web, web of data, linked dataKnowledge Engineering: Semantic web, web of data, linked data
Knowledge Engineering: Semantic web, web of data, linked dataFranck Michel
 
Modelling Biodiversity Linked Data: Pragmatism May Narrow Future Opportunities
Modelling Biodiversity Linked Data: Pragmatism May Narrow Future OpportunitiesModelling Biodiversity Linked Data: Pragmatism May Narrow Future Opportunities
Modelling Biodiversity Linked Data: Pragmatism May Narrow Future OpportunitiesFranck Michel
 
A Model to Represent Nomenclatural and Taxonomic Information as Linked Data. ...
A Model to Represent Nomenclatural and Taxonomic Information as Linked Data. ...A Model to Represent Nomenclatural and Taxonomic Information as Linked Data. ...
A Model to Represent Nomenclatural and Taxonomic Information as Linked Data. ...Franck Michel
 
Integrating Heterogeneous Data Sources in the Web of Data
Integrating Heterogeneous Data Sources in the Web of DataIntegrating Heterogeneous Data Sources in the Web of Data
Integrating Heterogeneous Data Sources in the Web of DataFranck Michel
 
Construction d’un référentiel taxonomique commun pour des études sur l’histoi...
Construction d’un référentiel taxonomique commun pour des études sur l’histoi...Construction d’un référentiel taxonomique commun pour des études sur l’histoi...
Construction d’un référentiel taxonomique commun pour des études sur l’histoi...Franck Michel
 
A Mapping-based Method to Query MongoDB Documents with SPARQL
A Mapping-based Method to Query MongoDB Documents with SPARQLA Mapping-based Method to Query MongoDB Documents with SPARQL
A Mapping-based Method to Query MongoDB Documents with SPARQLFranck Michel
 
A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...
A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...
A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...Franck Michel
 
Make our Scientific Datasets Accessible and Interoperable on the Web
Make our Scientific Datasets Accessible and Interoperable on the WebMake our Scientific Datasets Accessible and Interoperable on the Web
Make our Scientific Datasets Accessible and Interoperable on the WebFranck Michel
 
Translation of Relational and Non-Relational Databases into RDF with xR2RML
Translation of Relational and Non-Relational Databases into RDF with xR2RMLTranslation of Relational and Non-Relational Databases into RDF with xR2RML
Translation of Relational and Non-Relational Databases into RDF with xR2RMLFranck Michel
 
Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archa...
Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archa...Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archa...
Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archa...Franck Michel
 

More from Franck Michel (14)

ISSA: Generic Pipeline, Knowledge Model and Visualization tools to Help Scien...
ISSA: Generic Pipeline, Knowledge Model and Visualization tools to Help Scien...ISSA: Generic Pipeline, Knowledge Model and Visualization tools to Help Scien...
ISSA: Generic Pipeline, Knowledge Model and Visualization tools to Help Scien...
 
Bioschemas: Marking up biodiversity websites to improve data discovery and we...
Bioschemas: Marking up biodiversity websites to improve data discovery and we...Bioschemas: Marking up biodiversity websites to improve data discovery and we...
Bioschemas: Marking up biodiversity websites to improve data discovery and we...
 
Unleash the Potential of your Website! 180,000 webpages from the French NHM m...
Unleash the Potential of your Website! 180,000 webpages from the French NHM m...Unleash the Potential of your Website! 180,000 webpages from the French NHM m...
Unleash the Potential of your Website! 180,000 webpages from the French NHM m...
 
Describe and Publish data sets on the web: vocabularies, catalogues, data por...
Describe and Publish data sets on the web: vocabularies, catalogues, data por...Describe and Publish data sets on the web: vocabularies, catalogues, data por...
Describe and Publish data sets on the web: vocabularies, catalogues, data por...
 
Knowledge Engineering: Semantic web, web of data, linked data
Knowledge Engineering: Semantic web, web of data, linked dataKnowledge Engineering: Semantic web, web of data, linked data
Knowledge Engineering: Semantic web, web of data, linked data
 
Modelling Biodiversity Linked Data: Pragmatism May Narrow Future Opportunities
Modelling Biodiversity Linked Data: Pragmatism May Narrow Future OpportunitiesModelling Biodiversity Linked Data: Pragmatism May Narrow Future Opportunities
Modelling Biodiversity Linked Data: Pragmatism May Narrow Future Opportunities
 
A Model to Represent Nomenclatural and Taxonomic Information as Linked Data. ...
A Model to Represent Nomenclatural and Taxonomic Information as Linked Data. ...A Model to Represent Nomenclatural and Taxonomic Information as Linked Data. ...
A Model to Represent Nomenclatural and Taxonomic Information as Linked Data. ...
 
Integrating Heterogeneous Data Sources in the Web of Data
Integrating Heterogeneous Data Sources in the Web of DataIntegrating Heterogeneous Data Sources in the Web of Data
Integrating Heterogeneous Data Sources in the Web of Data
 
Construction d’un référentiel taxonomique commun pour des études sur l’histoi...
Construction d’un référentiel taxonomique commun pour des études sur l’histoi...Construction d’un référentiel taxonomique commun pour des études sur l’histoi...
Construction d’un référentiel taxonomique commun pour des études sur l’histoi...
 
A Mapping-based Method to Query MongoDB Documents with SPARQL
A Mapping-based Method to Query MongoDB Documents with SPARQLA Mapping-based Method to Query MongoDB Documents with SPARQL
A Mapping-based Method to Query MongoDB Documents with SPARQL
 
A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...
A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...
A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...
 
Make our Scientific Datasets Accessible and Interoperable on the Web
Make our Scientific Datasets Accessible and Interoperable on the WebMake our Scientific Datasets Accessible and Interoperable on the Web
Make our Scientific Datasets Accessible and Interoperable on the Web
 
Translation of Relational and Non-Relational Databases into RDF with xR2RML
Translation of Relational and Non-Relational Databases into RDF with xR2RMLTranslation of Relational and Non-Relational Databases into RDF with xR2RML
Translation of Relational and Non-Relational Databases into RDF with xR2RML
 
Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archa...
Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archa...Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archa...
Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archa...
 

Recently uploaded

iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWebiThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWebJie Liau
 
Free scottie t shirts Free scottie t shirts
Free scottie t shirts Free scottie t shirtsFree scottie t shirts Free scottie t shirts
Free scottie t shirts Free scottie t shirtsrahman018755
 
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkkaudience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkklolsDocherty
 
Bug Bounty Blueprint : A Beginner's Guide
Bug Bounty Blueprint : A Beginner's GuideBug Bounty Blueprint : A Beginner's Guide
Bug Bounty Blueprint : A Beginner's GuideVarun Mithran
 
Development Lifecycle.pptx for the secure development of apps
Development Lifecycle.pptx for the secure development of appsDevelopment Lifecycle.pptx for the secure development of apps
Development Lifecycle.pptx for the secure development of appscristianmanaila2
 
Statistical Analysis of DNS Latencies.pdf
Statistical Analysis of DNS Latencies.pdfStatistical Analysis of DNS Latencies.pdf
Statistical Analysis of DNS Latencies.pdfOndejSur
 
I’ll See Y’All Motherfuckers In Game 7 Shirt
I’ll See Y’All Motherfuckers In Game 7 ShirtI’ll See Y’All Motherfuckers In Game 7 Shirt
I’ll See Y’All Motherfuckers In Game 7 Shirtrahman018755
 
Premier Mobile App Development Agency in USA.pdf
Premier Mobile App Development Agency in USA.pdfPremier Mobile App Development Agency in USA.pdf
Premier Mobile App Development Agency in USA.pdfappinfoedgeca
 
Reggie miller choke t shirtsReggie miller choke t shirts
Reggie miller choke t shirtsReggie miller choke t shirtsReggie miller choke t shirtsReggie miller choke t shirts
Reggie miller choke t shirtsReggie miller choke t shirtsrahman018755
 
AI Generated 3D Models | AI 3D Model Generator
AI Generated 3D Models | AI 3D Model GeneratorAI Generated 3D Models | AI 3D Model Generator
AI Generated 3D Models | AI 3D Model Generator3DailyAI1
 
Production 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptxProduction 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptxChloeMeadows1
 
Registry Data Accuracy Improvements, presented by Chimi Dorji at SANOG 41 / I...
Registry Data Accuracy Improvements, presented by Chimi Dorji at SANOG 41 / I...Registry Data Accuracy Improvements, presented by Chimi Dorji at SANOG 41 / I...
Registry Data Accuracy Improvements, presented by Chimi Dorji at SANOG 41 / I...APNIC
 
Cyber Security Services Unveiled: Strategies to Secure Your Digital Presence
Cyber Security Services Unveiled: Strategies to Secure Your Digital PresenceCyber Security Services Unveiled: Strategies to Secure Your Digital Presence
Cyber Security Services Unveiled: Strategies to Secure Your Digital PresencePC Doctors NET
 
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.Tortogel
 
Thank You Luv I’ll Never Walk Alone Again T shirts
Thank You Luv I’ll Never Walk Alone Again T shirtsThank You Luv I’ll Never Walk Alone Again T shirts
Thank You Luv I’ll Never Walk Alone Again T shirtsrahman018755
 
The Rise of Subscription-Based Digital Services.pdf
The Rise of Subscription-Based Digital Services.pdfThe Rise of Subscription-Based Digital Services.pdf
The Rise of Subscription-Based Digital Services.pdfe-Market Hub
 

Recently uploaded (17)

iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWebiThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
 
Free scottie t shirts Free scottie t shirts
Free scottie t shirts Free scottie t shirtsFree scottie t shirts Free scottie t shirts
Free scottie t shirts Free scottie t shirts
 
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkkaudience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
 
Bug Bounty Blueprint : A Beginner's Guide
Bug Bounty Blueprint : A Beginner's GuideBug Bounty Blueprint : A Beginner's Guide
Bug Bounty Blueprint : A Beginner's Guide
 
Development Lifecycle.pptx for the secure development of apps
Development Lifecycle.pptx for the secure development of appsDevelopment Lifecycle.pptx for the secure development of apps
Development Lifecycle.pptx for the secure development of apps
 
Statistical Analysis of DNS Latencies.pdf
Statistical Analysis of DNS Latencies.pdfStatistical Analysis of DNS Latencies.pdf
Statistical Analysis of DNS Latencies.pdf
 
I’ll See Y’All Motherfuckers In Game 7 Shirt
I’ll See Y’All Motherfuckers In Game 7 ShirtI’ll See Y’All Motherfuckers In Game 7 Shirt
I’ll See Y’All Motherfuckers In Game 7 Shirt
 
Premier Mobile App Development Agency in USA.pdf
Premier Mobile App Development Agency in USA.pdfPremier Mobile App Development Agency in USA.pdf
Premier Mobile App Development Agency in USA.pdf
 
Reggie miller choke t shirtsReggie miller choke t shirts
Reggie miller choke t shirtsReggie miller choke t shirtsReggie miller choke t shirtsReggie miller choke t shirts
Reggie miller choke t shirtsReggie miller choke t shirts
 
AI Generated 3D Models | AI 3D Model Generator
AI Generated 3D Models | AI 3D Model GeneratorAI Generated 3D Models | AI 3D Model Generator
AI Generated 3D Models | AI 3D Model Generator
 
Production 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptxProduction 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptx
 
Registry Data Accuracy Improvements, presented by Chimi Dorji at SANOG 41 / I...
Registry Data Accuracy Improvements, presented by Chimi Dorji at SANOG 41 / I...Registry Data Accuracy Improvements, presented by Chimi Dorji at SANOG 41 / I...
Registry Data Accuracy Improvements, presented by Chimi Dorji at SANOG 41 / I...
 
Cyber Security Services Unveiled: Strategies to Secure Your Digital Presence
Cyber Security Services Unveiled: Strategies to Secure Your Digital PresenceCyber Security Services Unveiled: Strategies to Secure Your Digital Presence
Cyber Security Services Unveiled: Strategies to Secure Your Digital Presence
 
GOOGLE Io 2024 At takes center stage.pdf
GOOGLE Io 2024 At takes center stage.pdfGOOGLE Io 2024 At takes center stage.pdf
GOOGLE Io 2024 At takes center stage.pdf
 
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
 
Thank You Luv I’ll Never Walk Alone Again T shirts
Thank You Luv I’ll Never Walk Alone Again T shirtsThank You Luv I’ll Never Walk Alone Again T shirts
Thank You Luv I’ll Never Walk Alone Again T shirts
 
The Rise of Subscription-Based Digital Services.pdf
The Rise of Subscription-Based Digital Services.pdfThe Rise of Subscription-Based Digital Services.pdf
The Rise of Subscription-Based Digital Services.pdf
 

SPARQL Micro-Services: Lightweight Integration of Web APIs and Linked Data

  • 1. 1Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France F. Michel, C. Faron-Zucker, F. Gandon Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL Micro-Services: Lightweight Integration of Web APIs and Linked Data 11th International Workshop on Linked Data on the Web (LDOW) April 23rd 2018, Lyon, France
  • 2. 2Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Monolithic vs. Micro-services Architectures User Interface Business Layer Data Layer Monolithic Architecture Micro-services Architecture User Interface
  • 3. 3Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Micro-services Architecture(s) a.k.a. fined-grained SOA, serverless architecture Principle: decompose the app into multiple services • Fine-grained: focused on a simple, unique function (minimal) • Lightweight • Loosely coupled (complete) • Independently deployable • Standard APIs, common ways of identifying resources (composable) User Interface Benefits • Modularity: applications easier to test and deploy (continuous deployment) • Elasticity: scale one micro-service up or down independently of other services (e.g. app containers) • Language/technology freedom (polyglot application)
  • 4. 4Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Can we leverage µ-service principles to design LD-based applications? LD Application URI lookup Link traversalTriple store Query expansion SOLID data store Authentication
  • 5. 5Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Bridging Web APIs and Linked Data LD-based application Several common issues to tackle: • “REST-like” is not RESTful: • standard formats (e.g. JSON, XML) but proprietary vocabularies • documented in web pages but not machine-processable • no hyperlinks • Internal resource identifiers • What appropriate interface: LD document, REST (TPF, LDP), SPARQL?
  • 6. 6Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France The SPARQL Micro-services Architecture http://getPhotosByTag.example.org/sparql?tags=bridge https://api.flickr.com/services/rest? method=flickr.photos.search&format=json&api_key=…& tags=bridge Sµ ArgW SW ArgW Sµ translates Sw‘s response into an RDF graph and evaluates the SPARQL query against this graph. Lightweight method to query a Web API with SPARQL, and assign dereferenceable URIs to Web API resources
  • 7. 7Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France A SPARQL micro-service is a configurable SPARQL endpoint whose arguments delineate the virtual graph that is being queried.
  • 8. 8Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France  Fine-grained (one API, one service at a time)  Lightweight  Loosely-coupled (complete s/w unit)  Independently deployable (e.g. Docker)  Standard API and resource naming  Comply with standards SPARQL query language and protocol No extension needed  Pay-as-you-go Develop µ-services along with new arising needs  Simplicity Configuration-based provisioning Hide Web API technicalities Alignment with common/domain vocabularies SPARQL Micro-services Characteristics Sµ ArgW http://getPhotosByTag.example.org/sparql?tags=bridge
  • 9. 9Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Alternative options to pass µ-service arguments SELECT ?img WHERE { SERVICE <http://hostname/flickr/getPhotosByGroupByTag> { ?photo foaf:depiction ?img. <http://hostname/flickr/getPhotosByGroupByTag> a api:Service; api:execution [ api:param [ api:name "group_id"; api:value "806927@N20" ]; api:param [ api:name "tags"; api:value ?tag ]. ]. }} SELECT ?img WHERE { SERVICE <http://hostname/flickr/getPhotosByGroupByTag> { ?photo foaf:depiction ?img; api:group_id "806927@N20"; api:tags "bridge". }} SELECT ?img WHERE { SERVICE <http://hostname/flickr/getPhotosByGroupByTag> { ?photo foaf:depiction ?img. BIND("806927@N20" AS ?group_id) BIND("bridge" AS ?tags) }}  Arguments made explicit can be reused in the graph pattern.  Create new terms for each µ-service.  Terms possibly technical for which we do not want to define ontological terms.  Subject of these triples?  Little new terms, possibly coming from existing ontologies  Uniform manner to pass arguments.  Additional triples with somewhat artificial semantics: configure the service (how) but do not describe the searched resources (what).  No new terms needed.  Simple and easy-to-read.  Predefined variables with somewhat artificial semantics: configure the service (how) but do not describe the searched resources (what).
  • 10. 10Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Prototype implementation for JSON-based Web APIs SPARQL Client Service Logics Web API JSON-LD Profile SPARQL INSERT HTTP query JSON response Triple store SPARQL Micro-Service (1) (4) (2) (3) SPARQL query processing https://github.com/frmichel/sparql-micro-service https://hub.docker.com/u/frmichel
  • 11. 11Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Prototype implementation for JSON-based Web APIs Service Logics Web API JSON-LD Profile SPARQL CONSTRUCT HTTP query JSON response Triple store SPARQL Micro-Service LD Client Web Server URI dereferencing (1) (6) (3) (4) (2) (5) The URI is rewritten into an invocation of the appropriate SPARQL micro-service that returns the result of a CONSTRUCT query. The result is transparently proxied back to the client. http://example.org/photo/472495
  • 12. 12Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Evaluation: 2% to 4% overhead compared to direct Web API query Biodiversity related use-case to retrieve:  photos from Flickr,  audio recordings from the Macauley Library,  music tunes from MusicBrainz Query execution time (in seconds) for individual SPARQL micro-services. The last column is the overhead imposed by the SPARQL micro-service compared to a direct Web API query.
  • 13. 13Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Impact of the SPARQL engine evaluation strategy Independence of graph patterns: Virtuoso OS follow the worst evaluation strategy (https://github.com/openlink/virtuoso-opensource/issues/724). Parallelism: Virtuoso OS and Corese-KGRAM do not evaluate SERVICE clauses in parallel although they are independent.
  • 14. 14Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France
  • 15. 15Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Richer, self-describing interface Self-describing metadata • Expected parameters, types of triples generated • Paging mechanism Follow the idea of Triple Pattern Fragments • Self-describing, uniform interface: triple + metadata + hypermedia controls • Allow navigate from one fragment (or page) to another Is SPARQL the right type of interface? • Embed metadata within SPARQL results (SELECT, ASK query forms)? • Restrict SPARQL Query to CONSTRUCT and DESCRIBE query forms? • Define a Graph Pattern Fragment interface?
  • 16. 16Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France General perspectives Push forward the reflection about micro-services vs. LD-based apps • other types of data sources • other types of services Most Web APIs provide R/W access SPARQL Update micro-service to achieve R/W Web of Data?
  • 17. 17Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France https://github.com/frmichel/sparql-micro-service https://hub.docker.com/u/frmichel Citation: Michel F., Faron-Zucker C. & Gandon F (2018). SPARQL Micro-Services: Lightweight Integration of Web APIs and Linked Data. In Proceedings of the Linked Data on the Web Workshop (LDOW2018). Lyon, France.