Rexster allowed in-session and sessionless requests, where the concept of "in-session" meant that every Gremlin script processed in that session occurred within the context of its own set of variable bindings for a ScriptEngine and executed within the same thread across requests. This mode of operation was important for use cases like Rexster Console where there was a need to incrementally execute Gremlin across multiple requests. In other words, I might issue each of the following lines in three separate requests:
v = g.addVertex()
v.setProperty('name','stephen')
g.commit()
As there is a notion of a "session", the variable "v" initialized on the first line is kept on the server and placed into the bindings for the next request on the second line. Finally, you have to manage your own transaction and commit the change.
This mode of operation is in contrast to sessionless communication where, the entire script would be issued as a single request, likely without the g.commit() as the server would auto-commit/rollback for you at the end of the request.
The question is whether Gremlin Server should follow in this pattern and support both in-session and sessionless requests. My personal feeling is that Gremlin Server should be focused and simple, thus only having sessionless requests. I haven't found any production use cases for in-session requests outside of the Rexster Console one and most implementations seem to focus on sessionless requests. Removing in-session as a requirement would yield a few benefits:
1. Less choice for those using Gremlin Server - one way to execute remote Gremlin and it's the "best" way.
2. A bit easier to write clients to Gremlin Server in other languages as the protocol gets simplified
3. Less code and code complexity in Gremlin Server...i suppose this could translate to less resources consumed on the server, but mostly means easier maintenance.
I think at this point I'm trying to weigh the value of having the in-session feature versus the benefits we would get without it. If anyone currently uses the "session" feature built into RexPro (outside of Rexster Console) and has some really good production use cases for it, I'd love to hear about them. Further, if anyone just generally thinks that dropping sessions is just a bad idea, I'd like to hear about that as well.
Best regards,
Stephen