[ 
https://issues.apache.org/jira/browse/TINKERPOP-2078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16662713#comment-16662713
 ] 

stephen mallette edited comment on TINKERPOP-2078 at 10/24/18 7:23 PM:
-----------------------------------------------------------------------

Re-worked a bit. Killed {{ReferenceGraph}} in favor of 
{{AnonymousTraversalSource}} with static {{traversal()}} methods that allow for 
this style:

{code}
gremlin> g = traversal(TinkerFactory.createModern())
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
gremlin> g = traversal('conf/remote-graph.properties')
==>graphtraversalsource[emptygraph[empty], standard]
gremlin> g = traversal(DriverRemoteConnection.using('localhost',8182))
==>graphtraversalsource[emptygraph[empty], standard]
{code}

It does unify the API for that initial {{TraversalSource}} construction, so 
that's good, but it relies on the same underlying methods that we already have. 
It also shorthands "remote" construction and gets {{EmptyGraph}} usage out of 
sight. It exists parallel to the current methods for {{TraversalSource}} 
creation, so it's like "another thing". A nice deprecation route would be good 
to hide away what we don't want users doing anymore, but I'm not sure I see a 
method for doing that just yet.

Also, doesn't prevent weirdness like: 
{{traversal(TinkerGraph.open()).withRemote(...)}} but perhaps discourages it.


was (Author: spmallette):
Re-worked a bit. Killed {{ReferenceGraph}} in favor of 
{{AnonymousTraversalSource}} with static {{traversal()}} methods that allow for 
this style:

{code}
gremlin> g = traversal(TinkerFactory.createModern())
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
gremlin> g = traversal('conf/remote-graph.properties')
==>graphtraversalsource[emptygraph[empty], standard]
gremlin> g = traversal(DriverRemoteConnection.using('localhost',8182))
==>graphtraversalsource[emptygraph[empty], standard]
{code}

It does unify the API for that initial {{TraversalSource}} construction, so 
that's good, but it relies on the same underlying methods that we already have. 
It also shorthands "remote" construction and gets {{EmptyGraph}} usage out of 
sight. It exists parallel to the current methods for {{TraversalSource}} 
creation, so it's like "another thing". A nice deprecation route would be good 
to hide away what we don't want users doing anymore, but I'm not sure I see a 
method for doing that just yet.

Also, doesn't prevent weirdness like: 
{{traversal(TinkerGraph.open()).withRemote(...)}}. 

> ReferenceGraph rather than EmptyGraph or RemoteGraph
> ----------------------------------------------------
>
>                 Key: TINKERPOP-2078
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2078
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: structure
>    Affects Versions: 3.3.4
>            Reporter: stephen mallette
>            Assignee: stephen mallette
>            Priority: Major
>
> {{RemoteGraph}} was long ago deprecated for {{withRemote()}} typically 
> spawned from {{EmptyGraph}} which is weird. Create {{ReferenceGraph}} which 
> sets up some 4.x concepts (given current thinking). For GLVs, make sure 
> {{EmptyGraph}} didn't leak into them and deal with those issues as needed. 
> Update all docs to stop using {{EmptyGraph}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to