Ogre, the Clojure wrapper for Gremlin, has just released an official
version to work with TinkerPop 3.x. Specifically it is working with
TinkerPop 3.2.0-incubating.

https://github.com/clojurewerkz/ogre

This is a beta release that is meant to gather feedback on the API and to
smooth out some rough edges, but it is fully compliant with the TinkerPop
process test suite so all your Gremlin should translate nicely to it.
Here's a simple example of what it looks like:

clojurewerkz.ogre.core=> (def graph (open-graph))
#'clojurewerkz.ogre.core/graph
clojurewerkz.ogre.core=> (def g (traversal graph))
#'clojurewerkz.ogre.core/g
clojurewerkz.ogre.core=>
(org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory/generateModern
graph)
nil
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"})

The documentation still needs some a bit of work, but feel free to play
around. If you are familiar with Gremlin Java/Groovy/Scala, it should be
pretty easy to follow. Enjoy!

Reply via email to