Slides for the presentation on Publishing with Triple Pattern Fragments in the Modeling, Generating and Publishing knowledge as Linked Data tutorial at EKAW 2016.
5. Requires Node.js ≥ 4.0
Installing and running the LDF server with Node
5
[sudo] npm install -g ldf-server
ldf-server config.json <port> <workers>
Documentation: https://github.com/LinkedDataFragments/Server.js
6. Requires Docker
Installing and running the LDF server with Docker
6
docker pull linkeddatafragments/server.js
docker run -p <port>:3000 -it --rm
-v $(pwd)/config.json:/tmp/config.json
ldf-server /tmp/config.json
7. Preconfigured LDF server with NGINX cache and web-client
Setting up a full stack with Docker (Compose)
7
docker-compose up
https://github.com/LinkedDataFragments/FullStackServer
8. {
"title": "My Linked Data Fragments server",
"datasources": {
"dbpedia": {
"title": "DBpedia 2014",
"type": "HdtDatasource",
"description": "DBpedia 2014 with an HDT back-end",
"settings": { "file": "data/dbpedia2014.hdt" }
},
"dbpedia-sparql": {
"title": "DBpedia 3.9 (Virtuoso)",
"type": "SparqlDatasource",
"description": "DBpedia 3.9 with a Virtuoso back-end",
"settings": { "endpoint": "http://dbpedia.restdesc.org/",
"defaultGraph": "http://dbpedia.org" }
}
}
}
LDF server is configured with config.json
8
9. {
"title": "My Linked Data Fragments server",
"datasources": {
"dbpedia": {
"title": "DBpedia 2014",
"type": "HdtDatasource",
"description": "DBpedia 2014 with an HDT back-end",
"settings": { "file": "data/dbpedia2014.hdt" }
},
"dbpedia-sparql": {
"title": "DBpedia 3.9 (Virtuoso)",
"type": "SparqlDatasource",
"description": "DBpedia 3.9 with a Virtuoso back-end",
"settings": { "endpoint": "http://dbpedia.restdesc.org/",
"defaultGraph": "http://dbpedia.org" }
}
}
}
Configure list of datasources
9
10. {
"title": "My Linked Data Fragments server",
"datasources": {
"dbpedia": {
"title": "DBpedia 2014",
"type": "HdtDatasource",
"description": "DBpedia 2014 with an HDT back-end",
"settings": { "file": "data/dbpedia2014.hdt" }
},
"dbpedia-sparql": {
"title": "DBpedia 3.9 (Virtuoso)",
"type": "SparqlDatasource",
"description": "DBpedia 3.9 with a Virtuoso back-end",
"settings": { "endpoint": "http://dbpedia.restdesc.org/",
"defaultGraph": "http://dbpedia.org" }
}
}
}
Load an HDT file
10
11. {
"title": "My Linked Data Fragments server",
"datasources": {
"dbpedia": {
"title": "DBpedia 2014",
"type": "HdtDatasource",
"description": "DBpedia 2014 with an HDT back-end",
"settings": { "file": "data/dbpedia2014.hdt" }
},
"dbpedia-sparql": {
"title": "DBpedia 3.9 (Virtuoso)",
"type": "SparqlDatasource",
"description": "DBpedia 3.9 with a Virtuoso back-end",
"settings": { "endpoint": "http://dbpedia.restdesc.org/",
"defaultGraph": "http://dbpedia.org" }
}
}
}
Act as a proxy to a SPARQL endpoint
11
14. Exposing multiple datasources as if it was one
Useful for fragmented datasets that can’t be merged
Compose multiple datasources
14
https://github.com/LinkedDataFragments/Server.js/blob/master/config/config-composite.json
15. Publishing with Triple Pattern Fragments
TPF server software
TPF client-side querying
Quad Pattern Fragments
Demo
15
18. Requires Node.js ≥ 4.0
Run from command line or include in your source code
Installing and running the LDF client with Node
18
[sudo] npm install -g ldf-client
ldf-client <tpf-endpoint-url> <sparql-query-path>
Documentation: https://github.com/LinkedDataFragments/Client.js
19. Requires Docker
Installing and running the LDF client with Docker
19
docker pull linkeddatafragments/client.js
docker run -it --rm
-v <sparql-query-path>:/tmp/query.sparql
linkeddatafragments/client.js
<tpf-endpoint-url> /tmp/query.sparql
20. Publishing with Triple Pattern Fragments
TPF server software
TPF client-side querying
Quad Pattern Fragments
20
21. Quads are triples extended with a fourth element, the graph
<s> <p> <o> <g>.
Triples sometimes need some context
21