[
https://issues.apache.org/jira/browse/TINKERPOP-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16259936#comment-16259936
]
David Pitera commented on TINKERPOP-1839:
-----------------------------------------
Also to further clarify, I understand Stephen's suggestion to add a helper
method to CGF that takes in the context as one of the input arguments so users
can issue WS and HTTP requests like
`ConfiguredGraphFactory.addGlobalBinding(map, context);`, however, I think
direct access (outside the context of a WS or HTTP gremlin script request) is
better because it allows for the implementation to control these things
directly and 2. it allows the implementation to handles these things outside
the context of a request (i.e. if we have an implementation running a cluster
of nodes and want the other nodes in the cluster to be able to update their
context's bindings without being issued a request and passed in the `context`
parameter. To further clarify this example, JanusGraph nodes communicate with
each other through a logging message queue, and it can be a valid use case for
one request to kick off the binding of said variable on other nodes in the
cluster (these nodes would not have direct access to the context parameter
passed in through the request.)
> We need a way to dynamically modify global bindings on the Gremlin Server.
> --------------------------------------------------------------------------
>
> Key: TINKERPOP-1839
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1839
> Project: TinkerPop
> Issue Type: Improvement
> Components: server
> Affects Versions: 3.2.6
> Reporter: David Pitera
>
> This question on StackOverflow
> https://stackoverflow.com/questions/47342524/how-to-traverse-graph-created-using-configuredplanfactory-in-janusgraph/47354728?noredirect=1#comment81670711_47354728
> along with the fact that most language client's interact with the Gremlin
> Server through the use of a variable bound to a graph of traversal reference,
> i.e. `graph` is usually bound to a graph and `g` is usually bound to its
> traversal
> https://github.com/apache/tinkerpop/blob/master/gremlin-server/scripts/empty-sample.groovy#L40
> mean that we need a way to bind these dynamically created graphs to the
> script executor.
> With JanusGraph's notion of dynamic graphs, there is no way to make use of
> the `withRemote()` functionality or make use of language clients demanding
> the traversal reference be bound to a variable.
> Therefore, we need a way to dynamically modify the global bindings on the
> gremlin script engine without having to restart the server.
> Note; I answered the original stack overflow question above, however I am
> pretty sure my answer is actually incorrect because the global binding will
> be evaluated once at server start and the evaluated references will be stored
> in the map and passed into the gremlin executor. Is this true?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)