Resolution: Won't Fix
Affects Version/s: 3.0.2-incubating
Fix Version/s: None
Here is a half-baked solution to the "local star graph"-problem in Gremlin OLAP.
A Traverser not only maintains a pointer to its current object, but also to its "local traversal spawn object." For instance:
The Traverser going into the where() step will, lets say, be at v. Thus:
At the next step, the Traverser[v] hits up the out("knows") step. This will trigger a message pass. Lets say v-
At this point, the Traverser[v] is shoved into has("name","bob") and lets say that v is "bob." What is the next step? There is none because its at the end of the local traversal. So, TraverserExecutor looks up step.getTraversal().getTraversalParent() and executes the local where()-step with a behavior of "v went into , and v came out." Thus, a "simulated local traversal" is "v --> v" and where()-step simply says "ah, v, then let me emit v". This yields a Traverser of:
The Traverser is sent back to v to solve the values('name')-step function.
This notion of a "simulated local traversal" is that the where()-step local traversal can be "wrapped" on the fly by TraverserExecutor such that:
So this is doable for a single local traversal. What about parallel local traversals like and(a,b,c). In this situation, a, b, and c must all come back before and() is complete. I think it might work something like this:
In this way, before the spawn is "released" by and(), three uuid:123-456-789 session ids must be returned with Traverser.get() != null. If that happens, the and() released v to the next step.
Note that in this model all the state is in the Traverser. There is no step state required. Given that Traversers are stored at the local vertex during iterations, looking up a Traverser by sessionId can be just as easy as looking it up by Traverser.get(). In this way, a placeholder Traverser exists at the and()-ing vertex waiting for its sessionId to complete.
.......................... a little sketchy and involved. But I think with some more mulling we can come up with a simple "ah, that is just a that which makes this just that and I can delete the entire codebase because there never was a problem to begin with. I can die yielding no intent. Finally."