Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1568

Change strategy application order

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Done
    • 3.2.3
    • 3.5.0
    • process

    Description

      Given a traversal with the structure:
      a(b(),c(d()))

      Strategies are applied in the order:

      StrategyA on a
      StrategyB on a
      StrategyA on b
      StrategyB on b
      StrategyA on c
      StrategyB on c
      StrategyA on d
      StrategyB on d
      

      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:

      StrategyA on a
      StrategyA on b
      StrategyA on c
      StrategyA on d
      StrategyB on a
      StrategyB on b
      StrategyB on c
      StrategyB on d
      

      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.

      Attachments

        Issue Links

          Activity

            People

              spmallette Stephen Mallette
              bryncooke Bryn Cooke
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: