I've never been quite settled on how to connect to remote graphs. For a
while we had RemoteGraph but that wasn't useful really because it was
largely non-functional, as you really just needed a remote configured
TraversalSource - so we deprecated that. TraversalSource.withRemote() is
fine, but you can't get to it without a Graph implementation to create the
TraversalSource in the first place. For that we started to use EmptyGraph,
which works, but is a bit confusing, but less confusing than using say,
TinkerGraph, JanusGraph, etc.

So, how do we nicely create a TraversalSource, that is meant to call
withRemote()?

We could create a new Graph implementation that's like EmptyGraph, called
ReferenceGraph, which would behave in the same fashion, but at least it
sorta fits because remoting only returns "Reference" elements. I suppose
ReferenceGraph is somewhere in between EmptyGraph and RemoteGraph in terms
of functionality so maybe it makes more sense usability wise than the
extremes of the other two? I wonder if ReferenceGraph is even a Graph
instance?? maybe it just has a single static method like:

g = ReferenceGraph.traversal(conf)

where traversal() constructs a GraphTraversalSource and proxies calls to
withRemote()? Not sure what happens to DSLs though...that might be trouble.

Anyway, it's a DISCUSS - so let's discuss.............

Reply via email to