Gremlin-Scala jsr223 ScriptEngine: done

89 views
Skip to first unread message

Michael Pollmeier

unread,
Jun 3, 2013, 5:59:18 AM6/3/13
to gremli...@googlegroups.com
Antonio VonG pointed me in the right direction, we have now a gremlin-scala ScriptEngine!

If anyone wants to give it a try, simply drop the four attached jars into your rexster ext directory and add gremlin-scala to the rexster.xml:
<script-engines>gremlin-groovy,gremlin-scala</script-engines>
Then open the console, type '?scala [enter]' and enjoy!

@Stephen:
1) rexster sends a groovy script to the scala scriptengine when it starts up. Can you have a look at that? You'll see the warnings on rexster startup.
2) if you want to add gremlin-scala as a dependency to Rexster, wait for 2.4.0. The current snapshop on master in a bad state, I've emailed Marko about it to resolve it.

Best regards
Michael

See https://github.com/mpollmeier/gremlin-scala/pull/7 for more details.
gremlin-scala-2.3.1.jar
scala-compiler-2.10.1.jar
scala-library-2.10.1.jar
scala-reflect-2.10.1.jar

Michael Pollmeier

unread,
Jun 3, 2013, 6:50:35 AM6/3/13
to gremli...@googlegroups.com
There seems to be an issue with titan, see https://github.com/mpollmeier/gremlin-scala/issues/8
Who can help?

Michael Pollmeier

unread,
Aug 24, 2013, 10:55:28 PM8/24/13
to gremli...@googlegroups.com
Hi Stephen,

good news: just got it to work with the Gremlin-Scala 2.5.0-SNAPSHOT and Rexster (2.4.0 and 2.5.0-SNAPSHOT). Please give it a try, too.
If it works as expected let's add some documentation to our wikis. I think the best place for this is the Rexster Wiki (you've already got some dummy code there), which I could link from Gremlin-Scala.

Instructions:
1) download http://www.michaelpollmeier.com/fileshare/gremlin-scala-2.5.0-SNAPSHOT-rexster-dropin.zip
2) unzip the four jars into rexster-standalone/ext
3) Add this block to rexster-standalone/config/rexster.xml inside <script-engines>:
<script-engine>
    <name>gremlin-scala</name>
</script-engine>

Sample usage:
rexster[groovy]> ?scala
rexster[scala]> val g = rexster.getGraph("tinkergraph")
==>g: com.tinkerpop.blueprints.Graph = tinkergraph[vertices:6 edges:6 directory:data/graph-example-1]
rexster[scala]> g.v(1).name
==>res1: Any = marko


PS: it won't work with Gremlin-Scala 2.4.1 because of bad imports

Reply all
Reply to author
Forward
0 new messages