quadstorejs / quadstore

A LevelDB-backed graph database for JS runtimes (Node.js, Deno, browsers, ...) supporting SPARQL queries and the RDF/JS interface.
https://github.com/quadstorejs/quadstore
MIT License
203 stars 14 forks source link

SPARQL: replace current implementation with a custom Comunica engine + the upcoming RDF/JS spec #105

Closed jacoscaz closed 4 years ago

jacoscaz commented 4 years ago

Things have changed over the course of the last few months:

Whereas there's still something to be said for a completely custom SPARQL engine, we could easily adapt what we have so far to support the new RDF/JS interface and move forward with a comunica-based SPARQL engine. That would give us something incredibly more powerful than what we could accomplish ourselves. Also, given the team who's working on comunica, I don't think we would incur in any performance issues.

rubensworks commented 4 years ago

comunica has added support for SPARQL UPDATE queries;

We actually don't have update support yet but it's a WIP though! So this will probably a blocker for you until we get that done.

Happy to help with creating custom configs if needed.

jacoscaz commented 4 years ago

That's not a big issue - we could handle UPDATE queries internally while delegating SELECT and others to Comunica. It seems like the query() method can accept both SPARQL queries in string form and instances of sparqlalgebrajs' Operation (https://github.com/comunica/comunica/blob/master/packages/actor-init-sparql/lib/ActorInitSparql-browser.ts#L133), so it should be relatively easy to start by using our own internal handling of SPARQL queries for UPDATE queries and move to Comunica's when ready (and contribute to Comunica in the meantime!)

rubensworks commented 4 years ago

we could handle UPDATE queries internally while delegating SELECT and others to Comunica.

That's sounds like a good option for now indeed.

It seems like the query() method can accept both SPARQL queries in string form and instances of sparqlalgebrajs' Operation

Indeed!

jacoscaz commented 4 years ago

This is coming along nicely in #107 through https://github.com/beautifulinteractions/node-quadstore-comunica

jacoscaz commented 4 years ago

Released on NPM - quadstore@7.0.1-alpha.9