I've made a number of changes to the Gremlin Extension for Rexster. Here's a quick summary of what's new:
1. For future support of other Gremlin flavors like, gremlin-scala or gremlin-javascript, Gremlin Extension now takes a "language" parameter that allows specification of the language to execute. By default this value is "groovy", if not specified and as there are no other flavors of Gremlin exposed in Rexster at this time, supplying any other option isn't going to get you too far.
2. The Gremlin Script Engine now re-instantiates itself every 1000 script runs to prevent PermGen issues that have been noted. Not a perfect fix by any means, but someone from Groovy is looking into the issue at its source:
http://jira.codehaus.org/browse/GROOVY-5187 (thanks to support from James Thornton)
3. Finally, all arguments passed to the Gremlin Extension, that are not expected by the extension itself, are added to the bindings for the Script Engine which allows a request as follows:
which would return something like:
{
"results": [
6,
"test"
],
"success": true,
"version": "0.8-SNAPSHOT",
"queryTime": 3547.145821
}
Best regards,
Stephen