Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Linked Data Fragments server #62

Open
jamesaoverton opened this issue Apr 10, 2018 · 3 comments
Open

Implement Linked Data Fragments server #62

jamesaoverton opened this issue Apr 10, 2018 · 3 comments

Comments

@jamesaoverton
Copy link
Contributor

The next feature that I want is a Linked Data Fragments server http://linkeddatafragments.org. Most of it should be implemented in CLJC, and we can refer to other implementations. This is just the dumb server part that returns quads/triples, not the more clever client part that handles SPARQL queries.

The backing data structure will be a vector of maps from keywords to strings or nil, representing an RDF quad. The keys are:

  • :gi graph IRI
  • :si subject IRI
  • :sb subject blank node
  • :pi predicate IRI
  • :oi object IRI
  • :ob object blank node
  • :ol object lexical
  • :di datatype IRI
  • :ln language tag

I've attached a sample file with ~3000 maps: obi_core.edn.zip

The system should accept queries like http://fragments.dbpedia.org/2016-04/en?predicate=http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23label&object=%22Brad%20Pitt%22%40en and return HTML pages very similar to that one. The basics are straightforward. Implementing all the details will take some work, but they're important.

We can start with triples, then look at quads (which LDF doesn't seem to support as well yet).

The goal for this first part is to be serve results that work for the primary LDF client implementation: https://github.com/LinkedDataFragments/Client.js

The main motivation for the new flat map representation is that it's easy to write to and read from a SQL table using JDBC. Once the basics are implemented in CLJC, I'd like a CLJ implementation that's backed by SQL. We can start with in-memory SQLite, then SQLite on disk, then connect to PostgreSQL.

The goal for this second part is to return an HTML page with ~100 triples in less than a second, even when the SQL table has ~10 million rows.

@inaimathi
Copy link
Contributor

@inaimathi
Copy link
Contributor

inaimathi commented May 3, 2018

Work proceeds in https://github.com/knocean/knode/tree/linked-data-fragments We've got the main functionality working in SQL; my next step is a cleanup phase wherein I'll separate out the SQL-backed implementation from the basic one and re-factor some of the request/query translation pieces. Once that's done, the last bit I'll need to finish is support for blank nodes in queries.

@inaimathi
Copy link
Contributor

Complete. This works with Sqlite3 in-memory and on-disk (and should in theory work transparently for Postgres with the appropriate driver and DB spec).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants