Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR provides an initial implementation of session support. If merged, it should close #113.
openSession
andcloseSession
to theGremlinClient
, both synchronous and asynchronous.openSession
function creates a new pool with just a single connection for the session, along with tracking the session name, which the client of the library will most often set to theString
representation of a UUID. An alternative would've been to just create a singleConnection
rather than a pool of 1, but using the pool allowed for greater re-use of existing functions without changes, because many of the functions involved in sending messages take a managed connection from the pool.execute
are sent to the session processor wi the session name, until the session is closed.Notably, I did learn a few things that might be viewed as limitations on the implementation.
idleConnectionTimeout
andkeepAliveInterval
to disable the ping/pong keep-alive messages altogether, to avoid that complexity. That should work fine for my use case but could be a limitation for others.As always, I welcome any review comments or requests for changes that I need to make in order for the PR to be suitable to merge.