SPARQL-Gremlin as a "Reference Implementation" Language in Apache TinkerPop

486 views
Skip to first unread message

Marko Rodriguez

unread,
Sep 18, 2015, 12:49:16 PM9/18/15
to gremli...@googlegroups.com, d...@tinkerpop.incubator.apache.org
Hello everyone,

Daniel Kuppitz did some really cool work getting SPARQL to compile to Gremlin's instruction set. 


Right now, this work is in Kuppitz' personal repo. However, I was thinking that it would be good to boost up this project such that we may someday merge it into Apache TinkerPop.

Why?

1. We have 3 reference graph system implementations in TinkerPop.
- TinkerGraph (POJO -- OLTP/OLAP)
- Neo4j (OLTP)
- Hadoop (OLAP)
2. We have 2 reference graph language implementations in TinkerPop.
- Gremlin-Java8
- Gremlin-Groovy

Why not have 3 language reference implementations AND have SPARQL-Gremlin be that 3rd language because:

1. It would demonstrate a language that is not embedded in a host-language (e.g. Java8, Groovy, Scala, etc.)
2. It would give TinkerPop an automatic RDF story without us having to do the whole Sesame/Jena song-and-dance.

Talking with Kuppitz, he likes the idea but is not too interested in deep-diving into SPARQL and spending too much of his time on this body of work. 

Perhaps someone out there in TinkerLand is an expert in SPARQL, understands the visitor-pattern used in the SPARQL-Gremlin compiler (uses Apache Jena's ARQ parser), and is willing to fully flesh out all the features of SPARQL into Gremlin.

Hope someone bites.

Take care,
Marko.

Joshua Shinavier

unread,
Oct 19, 2016, 3:46:38 PM10/19/16
to d...@tinkerpop.apache.org, Gremlin-users, d...@tinkerpop.incubator.apache.org
I have gotten a few more pings lately about projects needing generic RDF support in TinkerPop3 (see GraphSail and PropertyGraphSail from TP2), including SPARQL and RDFS inference support.  I think I/we will start developing this soon.  I will be soliciting contributions and feedback from potential users of the RDF tools, which will most likely use Eclipse RDF4j.

Josh


On Wed, Oct 19, 2016 at 12:29 PM, Carlos Buil Aranda <cbuil...@gmail.com> wrote:

hello,

sorry for opening up such an old message, but I have quite a bit of experience with SPARQL and I may be able to help in developing an extension to Tinkerpop for accepting SPARQL queries using Jena. Is this still an open problem?

Cheers

Carlos

Carlos Buil Aranda

unread,
Oct 19, 2016, 4:29:43 PM10/19/16
to Gremlin-users, d...@tinkerpop.incubator.apache.org

hello,

sorry for opening up such an old message, but I have quite a bit of experience with SPARQL and I may be able to help in developing an extension to Tinkerpop for accepting SPARQL queries using Jena. Is this still an open problem?

Cheers

Carlos

El viernes, 18 de septiembre de 2015, 13:49:16 (UTC-3), Marko A. Rodriguez escribió:

Carlos Buil Aranda

unread,
Oct 20, 2016, 7:51:37 AM10/20/16
to Gremlin-users, d...@tinkerpop.apache.org, d...@tinkerpop.incubator.apache.org
nice to know, may I ask why using RDF4J instead of Apache Jena? I'm just curious, I have more experience using Jena but I also know about RDF4j. Also, my understanding is that Tinkerpop currently does not support SPARQL, right?

I will keep an eye on the list for the need of contributions.

thanks!

Carlos

Carlos Buil Aranda

unread,
Oct 20, 2016, 8:18:57 AM10/20/16
to Gremlin-users, d...@tinkerpop.apache.org, d...@tinkerpop.incubator.apache.org
apart from Basic Graph Patterns and FILTER, as it is shown in https://github.com/dkuppitz/sparql-gremlin

Carlos

Marko Rodriguez

unread,
Oct 20, 2016, 9:12:23 AM10/20/16
to gremli...@googlegroups.com, d...@tinkerpop.apache.org, d...@tinkerpop.incubator.apache.org
Hi,

apart from Basic Graph Patterns and FILTER, as it is shown in https://github.com/dkuppitz/sparql-gremlin

This was primarily a proof-of-concept. I believe Kuppitz would be more than happy to have someone extend the work and make it “full-fledged.”

Marko.

-- 
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/cef79d90-8ff3-435d-a546-027cc34211f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Carlos Buil Aranda

unread,
Oct 20, 2016, 9:32:23 AM10/20/16
to Gremlin-users, d...@tinkerpop.apache.org, d...@tinkerpop.incubator.apache.org
good, I will communicate with Kuppitz to see how I can contribute.

Cheers

Carlos

Daniel Kuppitz

unread,
Oct 20, 2016, 9:48:38 AM10/20/16
to gremli...@googlegroups.com
Hi Carlos,

please just fork the project. I think I will just delete my POC project if you can make some good progress. Just keep us updated.
I personally don't like SPARQL very much, hence I haven't had much motivation to go any further than what we have now in the POC.

Cheers,
Daniel


To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/2f62cbf6-4429-49d7-b91c-c2413c809806%40googlegroups.com.

Joshua Shinavier

unread,
Oct 20, 2016, 12:36:55 PM10/20/16
to gremli...@googlegroups.com
Hi Carlos,


On Thu, Oct 20, 2016 at 4:51 AM, Carlos Buil Aranda <cbuil...@gmail.com> wrote:
nice to know, may I ask why using RDF4J instead of Apache Jena? I'm just curious, I have more experience using Jena but I also know about RDF4j.


It's a good question.  RDF4J and Jena are pretty comparable, while SPARQL-Gremlin is already written with Jena.  Jena is ASL-licensed, although RDF4J's EPL allows it to be freely linked as a dependency in TinkerPop or an ASL-licensed side project.

My main arguments for going with RDF4J for a storage layer are personal preference (I like the statement-centric API and the stackable, Sail approach to composing storage and reasoning capabilities), and the fact that there is a clear path to implementation, since this has been done before in TP2. We can make a Graph out of any Sail, and a Sail out of any compatible Graph (there are some requirements for indexing.  Previously, Neo4j, OrientDB, Titan, and a handful of other graph DBs were compatible with GraphSail).  There is a clear solution for writing as well as reading general-purpose RDF data.

In addition, the existing graph databases Stardog, Blazegraph, and Ontotext GraphDB use Sesame/RDF4J [1], Stardog and GraphDB include Sesame-Jena adapters [2, 3]).  The advantage of this is that one could use a GraphSail-like API interchangeably with an RDF4j-compatible graph DB, swapping out Neo4j for Stardog or vice versa, and be able to use SPARQL, Gremlin, reasoners, etc. either way.

The last time I suggested a TP3 GraphSail, there was a +1 for RDF4J [3], but it's up to the community.  Adapters can be used by those who prefer the opposite framework.


Also, my understanding is that Tinkerpop currently does not support SPARQL, right?

SPARQL-Gremlin could be expanded to support more of the SPARQL 1.1 spec.  Another option is to take advantage of an existing full-fledged SPARQL implementation, and replace key pieces with graph operations like those in SPARQL-Gremlin.  I took this approach with a tool called Stream42 [4], and adding SPARQL features there was pretty painless.  Back to Jena vs. RDF4J, a similar approach may be possible using ARQ.

 
I will keep an eye on the list for the need of contributions.


--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages