You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "David Pitera (JIRA)" <ji...@apache.org> on 2017/03/06 20:46:33 UTC
[jira] [Commented] (TINKERPOP-1438) Consider GraphManager as an
interface
[ https://issues.apache.org/jira/browse/TINKERPOP-1438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15898062#comment-15898062 ]
David Pitera commented on TINKERPOP-1438:
-----------------------------------------
Copying over from the issue I created:
Currently, Tinkerpop uses the [GraphManager](https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GraphManager.java) to handle graph management and store references to graph objects.
I propose that we change the graphManager in three ways:
1. The graphManager should be an interface, and the existing functionality should be moved into a `BasicGraphManager`. This allows the implementor to design their own graph manager so suit their graph management needs. Furthermore, this will need to allow the implementor to supply a graphManager class in the YAML, so the [Settings](https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java) must support a graphmanager, which of course can default to the `BasicGraphManager`.
2. We define additional methods on the interface to improve how the graphManager is used in existing Tinkerpop code. For example, [here](https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java#L156) we mutate an object directly outside the scope of a getter or setter on said object.
3. We define additional methods on the interface to allow for custom graph opening implementation:
// Implementation that allows for custom graph-opening implementations.
public Graph openGraph(String graphName, Supplier<Graph> supplier);
> Consider GraphManager as an interface
> -------------------------------------
>
> Key: TINKERPOP-1438
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1438
> Project: TinkerPop
> Issue Type: Improvement
> Components: server
> Affects Versions: 3.2.2
> Reporter: stephen mallette
> Priority: Minor
> Labels: breaking
>
> If {{GraphManager}} were an interface it would make embedding Gremlin Server easier as {{Graph}} instances could be more easily supplied by the host application. In doing this, It also might be good to force a {{TraversalSource}} to be referred to by both the {{Graph}} name and {{TraversalSource}} name.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)