I liked RemoteGraph. It was fairly concise in what it was. It also kept
things in line with other graphs, i.e. XGraph.open() (perhaps due to the
fact that they all had their roots here). EmptyGraph is kinda weird and
verbose [EmptyGraph.instance().traversal().withRemote()]
I don't like withRemote() on traversal. It's weird. It let's me do weird
things like TinkerGraph.open().traversal().withRemote(). Which graph am I
talking to now? And then the behavior could completely change by pointing
to other remotes. Will they all work in the same traversal? I don't know,
more on this later! In any case, it seems like the traversal should not
need to know if it's local or remote.
You want to call it ReferenceGraph because it has only reference elements.
Yeah, fine. But I think if you're not going to break the API completely,
then don't even bother breaking it a little. The API should be the same to
get a traversal. So, ReferenceGraph.open().traversal()
Or as Marko once thought that there is no Graph but just connections (and
mentioned ReferenceGraph) [1,2]. A local 'graph' is a LocalConnection. But
where does the traversal come from, the connection or is it submitted to
the connection?
Where I was going was something more like g = Traversal.with(Graph); or,
Traversal.with(Connection); g.V();
If we do the car analogy, the traversal is the directions (how to get from
a to b), the graph is roads (and the traverser is the car but you can't see
it, I guess this makes it an invisible car analogy). So it seems like a
traversal could be standalone, something that could be built even without a
graph: g = Traversal.V(); Then I want to apply my directions using some
road. g.with(Graph).next(); The point is that I should be able to swap
out what or where my Graph is without changing the traversal.
This is later.. what if you could mix graphs with with().
Traversal.with(graphA).V().as('a').with(graphB).V().where(eq('a')).by('name').
Cross-graphination!
1. https://groups.google.com/d/msg/gremlin-users/bran4kjn5IM/uy0RiBxSAgAJ
2.
https://lists.apache.org/thread.html/b4d80072ad36849b4e9cd3308f87115660574e3e7a4abb7ee68e959b@%3Cdev.tinkerpop.apache.org%3E
Robert Dale
On Wed, Aug 15, 2018 at 8:59 AM Stephen Mallette <[email protected]>
wrote:
> I was hoping to have a nicer solution than EmptyGraph in 3.4.0 which might
> mean some change in 3.2.x/3.3.x depending on what that was.....
>
>
> On Wed, Aug 15, 2018 at 8:28 AM Robert Dale <[email protected]> wrote:
>
> > Are you thinking of another mid-stream change or something for TinkerPop
> > 3.4 or 4.0?
> >
> > Robert Dale
> >
> >
> > On Mon, Aug 13, 2018 at 6:35 PM Stephen Mallette <[email protected]>
> > wrote:
> >
> > > Yes - I did consider killing instantiation through a Graph except that:
> > >
> > > 1. It felt like a major major departure from what we have been doing
> and
> > if
> > > users have been using things like GraphFactory to instantiate graphs
> then
> > > they might continue to expect that support (currently supported by
> > > RemoteGraph)
> > > 2. Given 1 above, the test suite is one of those things that relies on
> > > that...........
> > > 3. Didn't really think of a suitable API that I loved to suggest
> dealing
> > > with the fallout of 1 and 2, but perhaps I didn't try hard enough.
> > >
> > >
> > >
> > > On Mon, Aug 13, 2018 at 5:05 PM Robert Dale <[email protected]> wrote:
> > >
> > > > Why does it have to be a graph at all? Maybe getting a traversal
> from
> > a
> > > > graph is the wrong concept and that's why it perplexes you so. We're
> > > > connecting to a server that can contain one or more graphs. The
> > > traversal
> > > > should probably come off the connection or be standalone. Maybe the
> > > > traversal takes a graph.
> > > >
> > > > Robert Dale
> > > >
> > > > On Fri, Aug 10, 2018 at 3:01 PM Stephen Mallette <
> [email protected]
> > >
> > > > wrote:
> > > >
> > > > > 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.............
> > > > >
> > > >
> > >
> >
>