[ 
https://issues.apache.org/jira/browse/TINKERPOP-1568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16963095#comment-16963095
 ] 

ASF GitHub Bot commented on TINKERPOP-1568:
-------------------------------------------

spmallette commented on pull request #1211: TINKERPOP-1568 Changed Strategy 
Application Methodology
URL: https://github.com/apache/tinkerpop/pull/1211
 
 
   https://issues.apache.org/jira/browse/TINKERPOP-1568
   
   Please refer to the JIRA issue for details as well as the Upgrade Docs on 
this PR for more information about this one. I'm generally happy with how few 
changes were actually involved in making this happen - if you take away my 
light refactoring for inclusion of the `IsRoot()` method very few files had to 
really change and for the most part the changes themselves were fairly 
straightforward. It didn't always look this way - took a fair amount of effort 
to get to the root of why certain changes were necessary to then refactor for 
greater simplicity. 
   
   I think the only thing I wasn't really able to sort out "nicely" was 
`MessagePassingReductionStrategy`. It seems to need to know a lot about 
`profile()` for some reason and I wasn't quite able to sort out a better way to 
do what was necessary there. I think I'm just going to have to submit that 
as-is unless someone has better ideas.
   
   All tests pass with `docker/build.sh -t -n -i`
   
   VOTE +1
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> 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
>            Priority: Major
>              Labels: breaking
>
> 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
(v8.3.4#803005)

Reply via email to