OData / SPARQLInteropKal Ahmed (@kal_ahmed)Graham Moore (@gra_moore)
Agenda• Quick Overview of OData• Motivation• Implementation• Questions
OData“OData is a standardized protocolfor creating and consumingdata APIs”odata.org
Entity-Centric• Collection of Entity Sets• Service metadata– List of entity sets– Schema for entities• Primary Keys• Prope...
URL-based accesshttp://example.org/Filmshttp://example.org/Films(1234)http://example.org/Films?$filter=Runtime lt 120http:...
RESTful Update• POST to entity set‟s URL• PUT, PATCH, MERGE or DELETE to theedit URL of an existing entity• Associations c...
Other Features• Media entities– Combine metadata properties with a specialmedia source URL.• Named Streams– Entity propert...
Reasons to Like OData• Schema discovery• Client tooling support (esp for .NET)• Easy to experiment• Easy to use from JavaS...
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 end...
Previous Attempt• LINQ – to – SPARQL– Hand-crafted model as annotated C#interfaces– Generated implementation classes– ODat...
Implementation• Proxy service for a SPARQL endpoint– OData service description derived from theschema of the SPARQL endpoi...
Annotating OData Services• Annotations are part of the OData spec.• We define annotations for:– URI namespace for entity p...
Implementation Issues• DESCRIBE is not an option• CONSTRUCTed graphs– Sorting– Identifying the entity resources• Server-co...
Select a Single FilmOData/Films(„Un_Chien_Andalou‟)SPARQLCONSTRUCT {res:Un_Chien_Andalou ?p ?o .} WHERE {res:Un_Chien_Anda...
Enumerate FilmsOData/FilmsSPARQLCONSTRUCT {?v1 ?v1_p ?v1_o.?v1 ods:variable-binding “v1”} WHERE {?v1 ?v1_p ?v1_o .{SELECT ...
Property NavigationOData/Films(„Un_Chien_Andalou‟)/DirectorSPARQLCONSTRUCT {?v1 ?v1_p ?v1_o .?v1 ods:variable-binding “v1”...
Questions• In discussing Open Data what is theperceived importance of standardsinteroperability ?• If it is important, whe...
More Questions• What could W3C Linked Data Platformlearn from OData and vice-versa ?• Should these efforts be sharing use-...
Final Question• Is there a meta-model for an entity-oriented view of data resources ?One that both OData and LDP could sha...
Upcoming SlideShare
Loading in...5
×

OData/SPARQL Interop

3,438

Published on

A presentation about our project to provide an OData gateway over a SPARQL query service to enable OData clients to consume linked data from a SPARQL query endpoint.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,438
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • 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.
  • Transcript of "OData/SPARQL Interop"

    1. 1. OData / SPARQLInteropKal Ahmed (@kal_ahmed)Graham Moore (@gra_moore)
    2. 2. Agenda• Quick Overview of OData• Motivation• Implementation• Questions
    3. 3. OData“OData is a standardized protocolfor creating and consumingdata APIs”odata.org
    4. 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. 5. URL-based accesshttp://example.org/Filmshttp://example.org/Films(1234)http://example.org/Films?$filter=Runtime lt 120http://example.org/Films(1234)/Directorhttp://example.org/Films(1234)?$expand=Director,Actor
    6. 6. RESTful Update• POST to entity set‟s URL• PUT, PATCH, MERGE or DELETE to theedit URL of an existing entity• Associations can also be exposed as acollection of link resources.
    7. 7. Other Features• Media entities– Combine metadata properties with a specialmedia 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 operationsexposed as URLs
    8. 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. 9. Criticisms of OData• Services tend to be siloes• No shared ontologies• Perceived as a vendor-specific protocol
    10. 10. ODATA / SPARQL INTEROP
    11. 11. Motivation• We like the features of OData• We like the flexibility of RDF / SPARQL• Goals:– Read access to open SPARQL endpoints viaOData– Declarative configuration– Automatic configuration via RDF schema /SPARQL introspection
    12. 12. Previous Attempt• LINQ – to – SPARQL– Hand-crafted model as annotated C#interfaces– Generated implementation classes– OData -> LINQ -> SPARQL and all the wayback– Worked, but it was clunky
    13. 13. Implementation• Proxy service for a SPARQL endpoint– OData service description derived from theschema of the SPARQL endpoint– OData request converted to a SPARQL query– SPARQL response converted to OData response– Stateless– Configured by an annotated OData schemadocumenthttp://github.com/brightstardb/odata-sparql
    14. 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 publishedschema• Allows consumer to reconstruct the sourcetriples
    15. 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. 16. Select a Single FilmOData/Films(„Un_Chien_Andalou‟)SPARQLCONSTRUCT {res:Un_Chien_Andalou ?p ?o .} WHERE {res:Un_Chien_Andalou ?p ?o .}
    17. 17. Enumerate FilmsOData/FilmsSPARQLCONSTRUCT {?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. 18. Property NavigationOData/Films(„Un_Chien_Andalou‟)/DirectorSPARQLCONSTRUCT {?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. 19. Questions• In discussing Open Data what is theperceived importance of standardsinteroperability ?• If it is important, where does theresponsibility for interoperability lie ?
    20. 20. More Questions• What could W3C Linked Data Platformlearn from OData and vice-versa ?• Should these efforts be sharing use-cases ?
    21. 21. Final Question• Is there a meta-model for an entity-oriented view of data resources ?One that both OData and LDP could share.

    ×