SlideShare a Scribd company logo
1 of 21
OData / SPARQL
Interop
Kal Ahmed (@kal_ahmed)
Graham Moore (@gra_moore)
Agenda
• Quick Overview of OData
• Motivation
• Implementation
• Questions
OData
“OData is a standardized protocol
for creating and consuming
data APIs”
odata.org
Entity-Centric
• Collection of Entity Sets
• Service metadata
– List of entity sets
– Schema for entities
• Primary Keys
• Properties & Associations
• Results are returned as entities by default
URL-based access
http://example.org/Films
http://example.org/Films(1234)
http://example.org/Films?$filter=Runtime lt 120
http://example.org/Films(1234)/Director
http://example.org/Films(1234)?$expand=Director,Actor
RESTful Update
• POST to entity set‟s URL
• PUT, PATCH, MERGE or DELETE to the
edit URL of an existing entity
• Associations can also be exposed as a
collection of link resources.
Other Features
• Media entities
– Combine metadata properties with a special
media source URL.
• Named Streams
– Entity properties of type Edm.Stream
– Represented in the entity as a URL
• Custom Actions and Functions
– Entity set or entity-specific operations
exposed as URLs
Reasons to Like OData
• Schema discovery
• Client tooling support (esp for .NET)
• Easy to experiment
• Easy to use from JavaScript
• Growing set of OData consumers
– Data browsers
– GUI controls
– Applications
Criticisms of OData
• Services tend to be siloes
• No shared ontologies
• Perceived as a vendor-specific protocol
ODATA / SPARQL INTEROP
Motivation
• We like the features of OData
• We like the flexibility of RDF / SPARQL
• Goals:
– Read access to open SPARQL endpoints via
OData
– Declarative configuration
– Automatic configuration via RDF schema /
SPARQL introspection
Previous Attempt
• LINQ – to – SPARQL
– Hand-crafted model as annotated C#
interfaces
– Generated implementation classes
– OData -> LINQ -> SPARQL and all the way
back
– Worked, but it was clunky
Implementation
• Proxy service for a SPARQL endpoint
– OData service description derived from the
schema of the SPARQL endpoint
– OData request converted to a SPARQL query
– SPARQL response converted to OData response
– Stateless
– Configured by an annotated OData schema
document
http://github.com/brightstardb/odata-sparql
Annotating OData Services
• Annotations are part of the OData spec.
• We define annotations for:
– URI namespace for entity primary keys
– URIs for entity types, properties and associations
– Direction of associations
• Annotations are made to the published
schema
• Allows consumer to reconstruct the source
triples
Implementation Issues
• DESCRIBE is not an option
• CONSTRUCTed graphs
– Sorting
– Identifying the entity resources
• Server-controlled paging for OData
• Paging requires sub-queries
• Entities require a common identifier prefix
Select a Single Film
OData
/Films(„Un_Chien_Andalou‟)
SPARQL
CONSTRUCT {
res:Un_Chien_Andalou ?p ?o .
} WHERE {
res:Un_Chien_Andalou ?p ?o .
}
Enumerate Films
OData
/Films
SPARQL
CONSTRUCT {
?v1 ?v1_p ?v1_o.
?v1 ods:variable-binding “v1”
} WHERE {
?v1 ?v1_p ?v1_o .
{
SELECT { ?v1 rdf:type o:Film . } LIMIT 100
}
}
Property Navigation
OData
/Films(„Un_Chien_Andalou‟)/Director
SPARQL
CONSTRUCT {
?v1 ?v1_p ?v1_o .
?v1 ods:variable-binding “v1” .
} WHERE {
?v1 ?v1_p ?v1_o .
SELECT {
?v1 WHERE {
res:Un_Chien_Andalou p:director ?v1 .
} LIMIT 100
}
Questions
• In discussing Open Data what is the
perceived importance of standards
interoperability ?
• If it is important, where does the
responsibility for interoperability lie ?
More Questions
• What could W3C Linked Data Platform
learn from OData and vice-versa ?
• Should these efforts be sharing use-cases ?
Final Question
• Is there a meta-model for an entity-
oriented view of data resources ?
One that both OData and LDP could share.

More Related Content

What's hot

Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Simplilearn
 

What's hot (20)

Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
 
Synthetic models
Synthetic modelsSynthetic models
Synthetic models
 
Apache Spark in Industry
Apache Spark in IndustryApache Spark in Industry
Apache Spark in Industry
 
Introduction to Spark SQL training workshop
Introduction to Spark SQL training workshopIntroduction to Spark SQL training workshop
Introduction to Spark SQL training workshop
 
Spark from the Surface
Spark from the SurfaceSpark from the Surface
Spark from the Surface
 
New Persistence Features in Spring Roo 1.1
New Persistence Features in Spring Roo 1.1New Persistence Features in Spring Roo 1.1
New Persistence Features in Spring Roo 1.1
 
Introduction to real time big data with Apache Spark
Introduction to real time big data with Apache SparkIntroduction to real time big data with Apache Spark
Introduction to real time big data with Apache Spark
 
Introduction to Machine Learning for Oracle Database Professionals
Introduction to Machine Learning for Oracle Database ProfessionalsIntroduction to Machine Learning for Oracle Database Professionals
Introduction to Machine Learning for Oracle Database Professionals
 
Spark SQL Tutorial | Spark Tutorial for Beginners | Apache Spark Training | E...
Spark SQL Tutorial | Spark Tutorial for Beginners | Apache Spark Training | E...Spark SQL Tutorial | Spark Tutorial for Beginners | Apache Spark Training | E...
Spark SQL Tutorial | Spark Tutorial for Beginners | Apache Spark Training | E...
 
Fast federated SQL with Apache Calcite
Fast federated SQL with Apache CalciteFast federated SQL with Apache Calcite
Fast federated SQL with Apache Calcite
 
Facet: Building Web Pages with SPARQL
Facet: Building Web Pages with SPARQLFacet: Building Web Pages with SPARQL
Facet: Building Web Pages with SPARQL
 
EAD3 Progress Report 2014-08-13
EAD3 Progress Report 2014-08-13EAD3 Progress Report 2014-08-13
EAD3 Progress Report 2014-08-13
 
SQL for NoSQL and how Apache Calcite can help
SQL for NoSQL and how  Apache Calcite can helpSQL for NoSQL and how  Apache Calcite can help
SQL for NoSQL and how Apache Calcite can help
 
Hadoop-Summit-2014-Apache-Falcon-Hadoop-First-ETL-Pipeline-Designer
Hadoop-Summit-2014-Apache-Falcon-Hadoop-First-ETL-Pipeline-DesignerHadoop-Summit-2014-Apache-Falcon-Hadoop-First-ETL-Pipeline-Designer
Hadoop-Summit-2014-Apache-Falcon-Hadoop-First-ETL-Pipeline-Designer
 
Battle of the giants: Apache Solr vs ElasticSearch
Battle of the giants: Apache Solr vs ElasticSearchBattle of the giants: Apache Solr vs ElasticSearch
Battle of the giants: Apache Solr vs ElasticSearch
 
Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501
 
Using Delta Lake to Transform a Legacy Apache Spark to Support Complex Update...
Using Delta Lake to Transform a Legacy Apache Spark to Support Complex Update...Using Delta Lake to Transform a Legacy Apache Spark to Support Complex Update...
Using Delta Lake to Transform a Legacy Apache Spark to Support Complex Update...
 
Introduction to Apache Spark
Introduction to Apache SparkIntroduction to Apache Spark
Introduction to Apache Spark
 
RESTful Web Service using Swagger
RESTful Web Service using SwaggerRESTful Web Service using Swagger
RESTful Web Service using Swagger
 
Search api d8
Search api d8Search api d8
Search api d8
 

Similar to OData/SPARQL Interop

Apache Olingo - ApacheCon Denver 2014
Apache Olingo - ApacheCon Denver 2014Apache Olingo - ApacheCon Denver 2014
Apache Olingo - ApacheCon Denver 2014
Stephan Klevenz
 
OData and SharePoint
OData and SharePointOData and SharePoint
OData and SharePoint
Sanjay Patel
 
3 rad extensibility-srilakshmi_s_rajesh_k
3 rad extensibility-srilakshmi_s_rajesh_k3 rad extensibility-srilakshmi_s_rajesh_k
3 rad extensibility-srilakshmi_s_rajesh_k
IBM
 

Similar to OData/SPARQL Interop (20)

Apache Olingo - ApacheCon Denver 2014
Apache Olingo - ApacheCon Denver 2014Apache Olingo - ApacheCon Denver 2014
Apache Olingo - ApacheCon Denver 2014
 
(ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service (ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service
 
Kantara OTTO slides
Kantara OTTO slidesKantara OTTO slides
Kantara OTTO slides
 
OData support in Cast Iron 7.5.1
OData support in Cast Iron 7.5.1OData support in Cast Iron 7.5.1
OData support in Cast Iron 7.5.1
 
REST - Why, When and How? at AMIS25
REST - Why, When and How? at AMIS25REST - Why, When and How? at AMIS25
REST - Why, When and How? at AMIS25
 
40020
4002040020
40020
 
40020
4002040020
40020
 
WOTS2E: A Search Engine for a Semantic Web of Things
WOTS2E: A Search Engine for a Semantic Web of ThingsWOTS2E: A Search Engine for a Semantic Web of Things
WOTS2E: A Search Engine for a Semantic Web of Things
 
Hypermedia for Machine APIs
Hypermedia for Machine APIsHypermedia for Machine APIs
Hypermedia for Machine APIs
 
Oracle REST Data Services: Options for your Web Services
Oracle REST Data Services: Options for your Web ServicesOracle REST Data Services: Options for your Web Services
Oracle REST Data Services: Options for your Web Services
 
Restful webservice
Restful webserviceRestful webservice
Restful webservice
 
scalaphx-akka-http
scalaphx-akka-httpscalaphx-akka-http
scalaphx-akka-http
 
JAX-RS Creating RESTFul services
JAX-RS Creating RESTFul servicesJAX-RS Creating RESTFul services
JAX-RS Creating RESTFul services
 
OData Services
OData ServicesOData Services
OData Services
 
OData and SharePoint
OData and SharePointOData and SharePoint
OData and SharePoint
 
Building RESTfull Data Services with WebAPI
Building RESTfull Data Services with WebAPIBuilding RESTfull Data Services with WebAPI
Building RESTfull Data Services with WebAPI
 
Ubicity pure tosca orchestration 2021-04-28
Ubicity pure tosca orchestration 2021-04-28Ubicity pure tosca orchestration 2021-04-28
Ubicity pure tosca orchestration 2021-04-28
 
Automating Enterprise Application Deployments with PowerShell
Automating Enterprise Application Deployments with PowerShellAutomating Enterprise Application Deployments with PowerShell
Automating Enterprise Application Deployments with PowerShell
 
DEVNET-1106 Upcoming Services in OpenStack
DEVNET-1106	Upcoming Services in OpenStackDEVNET-1106	Upcoming Services in OpenStack
DEVNET-1106 Upcoming Services in OpenStack
 
3 rad extensibility-srilakshmi_s_rajesh_k
3 rad extensibility-srilakshmi_s_rajesh_k3 rad extensibility-srilakshmi_s_rajesh_k
3 rad extensibility-srilakshmi_s_rajesh_k
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

OData/SPARQL Interop

  • 1. OData / SPARQL Interop Kal Ahmed (@kal_ahmed) Graham Moore (@gra_moore)
  • 2. Agenda • Quick Overview of OData • Motivation • Implementation • Questions
  • 3. OData “OData is a standardized protocol for creating and consuming data APIs” odata.org
  • 4. Entity-Centric • Collection of Entity Sets • Service metadata – List of entity sets – Schema for entities • Primary Keys • Properties & Associations • Results are returned as entities by default
  • 5. URL-based access http://example.org/Films http://example.org/Films(1234) http://example.org/Films?$filter=Runtime lt 120 http://example.org/Films(1234)/Director http://example.org/Films(1234)?$expand=Director,Actor
  • 6. RESTful Update • POST to entity set‟s URL • PUT, PATCH, MERGE or DELETE to the edit URL of an existing entity • Associations can also be exposed as a collection of link resources.
  • 7. Other Features • Media entities – Combine metadata properties with a special media source URL. • Named Streams – Entity properties of type Edm.Stream – Represented in the entity as a URL • Custom Actions and Functions – Entity set or entity-specific operations exposed as URLs
  • 8. Reasons to Like OData • Schema discovery • Client tooling support (esp for .NET) • Easy to experiment • Easy to use from JavaScript • Growing set of OData consumers – Data browsers – GUI controls – Applications
  • 9. Criticisms of OData • Services tend to be siloes • No shared ontologies • Perceived as a vendor-specific protocol
  • 10. ODATA / SPARQL INTEROP
  • 11. Motivation • We like the features of OData • We like the flexibility of RDF / SPARQL • Goals: – Read access to open SPARQL endpoints via OData – Declarative configuration – Automatic configuration via RDF schema / SPARQL introspection
  • 12. Previous Attempt • LINQ – to – SPARQL – Hand-crafted model as annotated C# interfaces – Generated implementation classes – OData -> LINQ -> SPARQL and all the way back – Worked, but it was clunky
  • 13. Implementation • Proxy service for a SPARQL endpoint – OData service description derived from the schema of the SPARQL endpoint – OData request converted to a SPARQL query – SPARQL response converted to OData response – Stateless – Configured by an annotated OData schema document http://github.com/brightstardb/odata-sparql
  • 14. Annotating OData Services • Annotations are part of the OData spec. • We define annotations for: – URI namespace for entity primary keys – URIs for entity types, properties and associations – Direction of associations • Annotations are made to the published schema • Allows consumer to reconstruct the source triples
  • 15. Implementation Issues • DESCRIBE is not an option • CONSTRUCTed graphs – Sorting – Identifying the entity resources • Server-controlled paging for OData • Paging requires sub-queries • Entities require a common identifier prefix
  • 16. Select a Single Film OData /Films(„Un_Chien_Andalou‟) SPARQL CONSTRUCT { res:Un_Chien_Andalou ?p ?o . } WHERE { res:Un_Chien_Andalou ?p ?o . }
  • 17. Enumerate Films OData /Films SPARQL CONSTRUCT { ?v1 ?v1_p ?v1_o. ?v1 ods:variable-binding “v1” } WHERE { ?v1 ?v1_p ?v1_o . { SELECT { ?v1 rdf:type o:Film . } LIMIT 100 } }
  • 18. Property Navigation OData /Films(„Un_Chien_Andalou‟)/Director SPARQL CONSTRUCT { ?v1 ?v1_p ?v1_o . ?v1 ods:variable-binding “v1” . } WHERE { ?v1 ?v1_p ?v1_o . SELECT { ?v1 WHERE { res:Un_Chien_Andalou p:director ?v1 . } LIMIT 100 }
  • 19. Questions • In discussing Open Data what is the perceived importance of standards interoperability ? • If it is important, where does the responsibility for interoperability lie ?
  • 20. More Questions • What could W3C Linked Data Platform learn from OData and vice-versa ? • Should these efforts be sharing use-cases ?
  • 21. Final Question • Is there a meta-model for an entity- oriented view of data resources ? One that both OData and LDP could share.

Editor's Notes

  1. Oxford-based software technology company developing products focussed on helping organisations to better manage the complex relationships between conceptual models such as business processes and domain knowledge and documents, data and other information that people use on a day-to-day basis.Developed out of working on the ISO standard for structured information exchange – Topic Maps.