You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by Stephen Mallette <sp...@gmail.com> on 2019/10/23 18:34:03 UTC

[DISCUSS] TraversalStrategy application methodology for 3.5.0

We've long had an issue with strategy application which we've wanted to
address. It's described in

https://issues.apache.org/jira/browse/TINKERPOP-1568

and basically just says that rather than apply all strategies to the parent
traversal and then recursively do the same for each child, apply each
strategy in turn from the parent to the child recursively. A subtle
difference but Bryn put the reasoning for the change nicely:

> [The current approach] prevents strategies from performing global
operations across
> the traversal and all decedents effectively as children will not have
been processed by
> preceding strategies yet.

With each major release of TinkerPop I've tried to implement this, but I've
never quite got it to work for basically the same reason Marko mentioned on
the JIRA. Well, for 3.5.0, I think I've sorted out all the problems and
have been getting clean runs of the build including integration tests.

Ultimately, there should be little in this change to affect end-users as
their Gremlin should simply behave as it always has. However, I've still
marked it as a breaking change in JIRA as providers who have custom
TraversalStrategy implementations may need to tweak their implementations
slightly. I had to modify a small number of the TinkerPop strategies to get
them working properly or to avoid extraneous processing that is no longer
necessary.

I'm still polishing up the branch a bit but I suspect to submit a pull
request to the master branch soon for review. I'm trying not to do too much
with it though so as to keep the diff clear for reviewers, but I think I
see other refactoring/performance enhancement opportunities as a result of
all this effort.