[
https://issues.apache.org/jira/browse/TINKERPOP-1568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15702612#comment-15702612
]
Marko A. Rodriguez commented on TINKERPOP-1568:
-----------------------------------------------
This is a good point:
"This prevents strategies from performing global operations across the
traversal and all decedents effectively as children will not have been
processed by preceding strategies yet."
As a "lets see what happens," I went ahead and changed the strategy application
order as prescribe.
https://gist.github.com/okram/bc2c4d3161f55d220b4ca8d98678192a (hacked as
this is not an efficient way to ultimately do this)
The standard process suite tests pass fine, but the computer process test
suites failed in numerous places... I can't seem to find a simple explanation
why. Anywho, seems that this change would be significant. Keeping it on the
back burner and for a major release.
> Change strategy application order
> ---------------------------------
>
> Key: TINKERPOP-1568
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1568
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.2.3
> Reporter: Bryn Cooke
>
> Given a traversal with the structure:
> a(b(),c(d()))
> Strategies are applied in the order:
> {noformat}
> StrategyA on a
> StrategyB on a
> StrategyA on b
> StrategyB on b
> StrategyA on c
> StrategyB on c
> StrategyA on d
> StrategyB on d
> {noformat}
> This prevents strategies from performing global operations across the
> traversal and all decedents effectively as children will not have been
> processed by preceding strategies yet.
> Say you want a strategy that compresses the entire traversal in to a string
> for sending over the wire, you want this to happen after everything else, but
> traversals with children will not have had their children processed.
> Ideally strategy application would be as follows:
> {noformat}
> StrategyA on a
> StrategyA on b
> StrategyA on c
> StrategyA on d
> StrategyB on a
> StrategyB on b
> StrategyB on c
> StrategyB on d
> {noformat}
> That way strategy B can check if it is being applied to the root traversal
> and if it is it knows that A has been applied globally.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)