DPLAfest 2016 logo

Testing a Linked Data Fragments Server using DPLA Data

A Redis Triplestore Cache for RDF Applications

Linked Data Fragments

RDF Graphs

The promise of RDF graphs for descriptive, structural, and relational metadata is that both simple and complex information can be represented in a single syntax that make up Subjects, Predicates, and Objects.

SPARQL Endpoints

Providing a full SPARQL endpoint for both small and large RDF linked-data sets is costly both in time and resources, especially for more complex queries. This often results in poor responses and unreliable service, especially if the SPARQL endpoint trying to handle multiple clients querying the RDF graph database.

Fragments

Ruben Verborgh of Ghent University in Belgium originated the concept of Linked Data Fragments that offers a middle-ground between different options for accessing RDF graph data. Instead of needing high-powered server to handle the processing load required for hosting a full SPARQL endpoint or the alternative of just providing a data dump where all of the data is processed locally to be useful, the Linked Data Fragments approach instead offers a lightweight querying pattern called a Triple Pattern Fragment that returns zero or more triples based on a simplified search syntax..

Triple Pattern Selector

A triple pattern fragment is determined by a triple pattern selector where each selector is made up a subject, predicate, or object. The subject and predicate must be either an IRI or a variable while the object must be either an IRI, variable, or literal value.

Examples

{ ?s ?p ?o . }
Subject http://dp.la/api/items/697865d065ccd4a47815a900049ee36d#sourceResource
Predicate http://dp.la/api/items/context/title
Object ?o
Result (pseudo-json)
{"data": [{"s":"http://dp.la/api/items/697865d065ccd4a47815a900049ee36d#sourceResource", 
           "p":"http://dp.la/api/items/context/title", 
           "o":"Chipped Projectile Points"}], 
 "metadata": {"s": ".", "p":"void:triples", "s": 1}}
		
Subject ?s
Predicate http://dp.la/api/items/context/title
Object ?o
Result (pseudo-json)
{"data": [{"s":"http://dp.la/api/items/697865d065ccd4a47815a900049ee36d#sourceResource", 
           "p":"http://dp.la/api/items/context/title", 
           "o":"Chipped Projectile Points"}], 
 "metadata": {"s": ".", "p":"void:triples", "s": 1}}
		

Server Beginnings