[
https://issues.apache.org/jira/browse/TINKERPOP-2078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16663675#comment-16663675
]
stephen mallette commented on TINKERPOP-2078:
---------------------------------------------
Taking a quiet suggestion from [~newkek] - he came up with something good that
provides a clear deprecation path. Syntax is not too different from what was
proposed above, but works more nicely with the patterns we sorta already had:
{code}
gremlin> g = traversal().withGraph(TinkerFactory.createModern())
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
gremlin> g = traversal().withRemote('conf/remote-graph.properties')
==>graphtraversalsource[emptygraph[empty], standard]
gremlin> g =
traversal().withRemote(DriverRemoteConnection.using('localhost',8182))
==>graphtraversalsource[emptygraph[empty], standard]
{code}
Note that {{traversal()}} will have the {{traversal(Class)}} overload so that
we can do DSLs. Basically, we've replicated the two traversal methods on
{{Graph}} so that they can be called anonymously.
{{TraversalSource.withRemote()}} can now be easily deprecated which sets things
up to stop weird/confusing configurations like
{{traversal().withGraph(graph).withRemote(...)}}
> Hide use of EmptyGraph or RemoteGraph behind a more unified method for
> TraversalSource construction
> ---------------------------------------------------------------------------------------------------
>
> 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. For GLVs, make sure
> {{EmptyGraph}} didn't leak into them and deal with those issues as needed.
> Update all docs to stop using {{EmptyGraph}}. Provide a way to unify
> {{TraversalSource}} construction for both local and remote connected graphs.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)