RESTful writable APIs for the web of Linked Data using relational - - PowerPoint PPT Presentation

restful writable apis for the web of linked data using
SMART_READER_LITE
LIVE PREVIEW

RESTful writable APIs for the web of Linked Data using relational - - PowerPoint PPT Presentation

RESTful writable APIs for the web of Linked Data using relational storage solutions Antonio Garrote Mara N.Moreno Garca Outline 1. Introduction 2. SPARQL to SQL mapping using R2RML 3. RESTful API 4. Conclusions Web APIs OAuth Key


slide-1
SLIDE 1

RESTful writable APIs for the web of Linked Data using relational storage solutions

Antonio Garrote María N.Moreno García

slide-2
SLIDE 2

Outline

  • 1. Introduction
  • 2. SPARQL to SQL mapping using R2RML
  • 3. RESTful API
  • 4. Conclusions
slide-3
SLIDE 3

Web APIs

Relational DB JSON

MVC HTTP API

Mobile App.

  • JS. App

Native App. Key Value Store Dynamic Web App.

OAuth

slide-4
SLIDE 4

Linked data APIs?

  • RDF data model vs JSON objects
  • Object IDs vs URIs
  • Properties identified by URIs vs plain

strings

  • URIs linking data in different services
slide-5
SLIDE 5

Transition path

  • Translation of SPARQL update queries into

SQL queries

  • RDF graphs encoded in JSON objects
  • RESTful protocol to manipulate RDF graphs
slide-6
SLIDE 6

SPARQL to SQL translation

  • R2RML starting point

R2RML Document

TableMappings Relational Data RDF quads

slide-7
SLIDE 7

SPARQL to SQL translation

  • inverse transformation

SPARQL Query QuadPatterns SQL

R2RML Document

QuadMatchers

slide-8
SLIDE 8

SPARQL to SQL translation

R2RML Mapping Constant Mappings Variable Mappings

(Table, Subject, Property, Object, Graph)

Quad Matchers

slide-9
SLIDE 9

SPARQL to SQL translation

SPARQL Quad Pattern Constant Terms Variables +BNode IDs

(Table, Subject, Property, Object, Graph)

Compatible?

slide-10
SLIDE 10

SPARQL to SQL translation

σ π σ π σ π

∪ ∪

SPARQL Quad Pattern Quad Matcher Quad Matcher Quad Matcher

SPARQL Relational Algebra SELECT

slide-11
SLIDE 11

SPARQL to SQL translation

SPARQL Quad Pattern Quad Matcher Quad Matcher Quad Matcher

Insert / Update SQL DM Query Insert

  • Min. Insertion Cost metric
slide-12
SLIDE 12

SPARQL to SQL translation

  • Different compatibility functions: data types,

language tags in literals

  • R2RML extensions to generate IDs from

URIs

  • Limitations: auto increment columns and

database constraints

slide-13
SLIDE 13

RESTful API

  • Starting point: “SPARQL 1.1 Uniform HTTP

Protocol for Managing RDF graphs”

  • Granularity: RDF named graph
  • HTTP uniform interface semantics
slide-14
SLIDE 14

RESTful API

  • Declarative definition of APIs (RDFS

vocabulary)

  • URI templates
  • Mapping of templates to SPARQL

endpoints

slide-15
SLIDE 15

RESTful API

  • Minting of resource URIs

HTTP POST Request RDF [ <p1> <o1> ; <p2> <o2>; ... ] HTTP GET Response RDF <uri> <p1> <o1> ; <p2> <o2>; ... New resource URI 201 200

graph_uri#self graph_uri

slide-16
SLIDE 16

RESTful API

  • Extensions (linked-data-api):
  • JSON-LD as the primary media type
  • Method overloading
  • JSONP support
  • Format URL parameter
  • Pagination parameters
slide-17
SLIDE 17

Sample Application

  • Library
  • Prototype
  • JavaScript client
  • RESTful API
  • FOAF+SSL auth
  • Relational backend

http://antoniogarrote.com/cvbuilder http://github.com/antoniogarrote/clj-r2rml

slide-18
SLIDE 18

Conclusions

  • Linked data and sem. web technologies can

help us to build better web APIs

  • Huge opportunity to increase the amount
  • f linked data available in the web
  • Real benefits for end users
  • Easy transition path for web developers

must be provided