Ogre and Gremlin Language Variants

Skip to first unread message

Stephen Mallette

May 1, 2016, 6:10:38 PM5/1/16
to Clojure Titanium
Hi everyone, 

Apache TinkerPop just published this tutorial on building Gremlin Language Variants (GLV): 

Ogre is obviously a GLV and as a TinkerPop member and a bit of a Clojure fan I've always had an interest in it as well as an interest in seeing TinkerPop have representation in the Clojure community. Given what I know of the patterns outlined in that tutorial, the very nice work Andrew Fitzgerald did to get the TinkerPop test suite working, as well as previous discussion on this list:

I set to work this weekend on re-writing Ogre and I'm a good portion of the way through GLV compliance. The code itself is massively simplified with a focus on wrapping the Traversal API and TinkerPop test suite implementation. I jettisoned a ton of what could be called "Ogre code" to do this, but TinkerPop 3.x was a re-write so maybe Ogre should be too. You can see what it all looks like in my fork:

At this point, I have almost the entire GraphTraversal API wrapped so you can write your Gremlin traversals in clojure. I need to tighten up the "anonymous" Traversal API and we probably need a little work on Graph instance creation. I only have two of the many test cases from the TinkerPop test suites implemented, but that's not too hard now that the pattern is present - it's just something to do (i.e. write the Ogre version of the TinkerPop defined Gremlin for a test). Then the docs need to be cleaned up for this new model and I think there is something releasable here.

I chose to do this in my fork as the change is quite extensive and I wanted to be sure the Ogre community was ok with the direction I'm headed. I'd be happy to hear discussion on the matter. 



Stephen Mallette

May 2, 2016, 7:54:01 PM5/2/16
to Clojure Titanium
I finished up support for both the GraphTraversal APIs and "anonymous" Traversals APIs for the newly released TinkerPop 3.2.0-incubating.  That means that Ogre has everything it needs to write Gremlin Traversals. I think Ogre can always develop it's API to be more clojure idiomatic, provide more helper functions or expand the TinkerPop classes wrapped, but the base I have now will be just about enough to at least be releasable imho.  

Note that I also I added more TinkerPop test implementations too (still a fair bit to go, but not hard work).  I accidentally pushed my "fresh" branch to the clojurewerkz repo, so I guess if you're following along you can look at the progress there:



Stephen Mallette

May 4, 2016, 7:39:36 PM5/4/16
to Clojure Titanium
I just pushed another batch of tests to the branch I previously referenced. I have about 40% of the basic TinkerPop process test suite implemented. Again, this is not really "hard" work - just time consuming to write all the Gremlin statements in clojure so that they can be validated against the TinkerPop suite. No one has voiced anything against the changes I've proposed yet, so I'm going to assume that silence is a good thing and keep forging ahead. :)

Stephen Mallette

May 9, 2016, 8:01:04 PM5/9/16
to Clojure Titanium
I had a good push over the weekend and am now in striking distance of having all the tests implemented. As this has developed, I've had to write a few hundred "Ogre traversals"so I'm definitely seeing a number of rough spots in the API that could be nicer, but I'm trying to just keep notes on those things and instead focusing on just completing the test suite implementation as that would provide a bare minimum for a quality release of Ogre against TinkerPop 3.2.0-incubating. Hopefully, in the next post I send, I will be able to say that the test implementations are complete and I can turn to getting some basic documentation written....I don't know how the documentation system works for:

Any pointers on that besides what's in the README? Anything else I should consider about Ogre in relation to releasing an artifact? are there any concerns about what i'm doing or the approach here?

Stephen Mallette

May 23, 2016, 9:43:42 AM5/23/16
to Clojure Titanium
Hello - everyone. I've finished up the test implementations about a week ago and did some other little odds and ends to complete basic usability. Ogre is TinkerPop GLV compliant at this point. I have a list of inconsistencies and annoyances I'd still like to see fixed, but it's very usable. Here's an example of a complex match traversal:

clojurewerkz.ogre.core=> (traverse g V (match
                    #_=>   (__ (as :a) (out :created) (as :b))
                    #_=>   (__ (as :b) (has :name "lop"))
                    #_=>   (__ (as :b) (in :created) (as :c))
                    #_=>   (__ (as :c) (has :age 29)))
                    #_=>   (select :a :c) (by :name)
                    #_=>   (into-seq!))
({"a" "marko", "c" "marko"} {"a" "josh", "c" "marko"} {"a" "peter", "c" "marko"})

I think it would be important to get some community feedback at this point and would like to suggest planning a "milestone" release for that purpose. In that way we can put a stake in the ground with some for of official version of Ogre that works with TinkerPop 3.x. How does that sound?

Also, i know the last word was that there was no desire to change the Ogre logo. I did however come up with a cool scene image that uses the existing logo with Gremlin. A friend of mine then took my idea and dragged it to the next level of awesomeness:

I'm asking permission of the Apache TinkerPop community to use Gremlin's likeness this way:

as per our image usage guidelines:

Anyway, I hope that is to everyone's liking.

Andrew Fitzgerald

May 23, 2016, 11:10:19 PM5/23/16
to Stephen Mallette, Clojure Titanium
Hey Stephen,
Sorry for taking so long to get back to you.  I think the updated ogre looks great (both the code and the logo).  The codebase is a lot simpler, and being able to use the official test suite is huge.

Most importantly, it's compatible with TP3 and actually works.
Count me as a +1 for cutting some sort of milestone release.


You received this message because you are subscribed to the Google Groups "Clojure Titanium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-titani...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stephen Mallette

May 25, 2016, 2:54:49 PM5/25/16
to Fred Eisele, Clojure Titanium
The changes can be built from this branch:

The README has a very basic sample. The Ogre API maps quite closely to TinkerPop's so there really isn't a lot of documentation to write. For now, I'd say that if there is a specific step you want to use and don't quite see the pattern, i would suggest looking at the tests for syntax.

Ultimately, I think it would be great if we could release an milestone artifact so you don't have to build the code, but until then you'll need to clone the repo and use lein.

On Wed, May 25, 2016 at 2:33 PM, Fred Eisele <fredric...@gmail.com> wrote:
Is there a recommended getting started guide/instructions for making use of the candidate ogre?

Stephen Mallette

May 26, 2016, 8:11:15 AM5/26/16
to Clojure Titanium
It's been a few days since I asked permission for the new Ogre image and no one has objected to our usage of Gremlin so I've gone ahead and updated the image in the README. 

I can't seem to get Travis to pass even though tests work locally - anyone have any ideas?
Reply all
Reply to author
0 new messages