You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
phlex currently caches data products/stores for a few node types (e.g. transforms, observers). This caching should be factored out of those nodes themselves and placed in a dedicated node for situations where a cached data product is needed (e.g. an algorithm that uses a data product from both the "job" and the "spill").
The following workflow shows a node consume that uses a data product $p$ from each run (indexed by $i$), and a data product $x$ from each spill in each run, which is indexed by the pair $(i, j)$.
For example, in run 4, the data-product $p_4$ is paired with each data product $x_{4,j}$ when presented to the consume node. It is difficult in oneTBB's flow graph to "repeat" the $p_4$ data product when paired with another data product that is presented to consume at a different cadence.
One solution, however, is to use a "repeater" node, which is a kind of unfold node. Because an unfold node generates one or more data products per input data product, the repeater node simply emits the same data product multiple times until an end token is received (checking that the right number of repetitions has occurred).
The following shows a data-flow graph that supports repeater nodes:
Note that 2 additional nodes are created (the repeater itself, and a node for sending the end token), and extra edges are added so that the repeater knows how often it should repeat the data product (the connection between $I(spill)$ and the $iter$ port).
An implementation of this scheme is exercised in #118.
The eventual solution chosen was to introduce an entity whose purpose is to emit the correct message IDs that can be used by repeaters.
Important changes wrt. the current implementation:
The multiplexer ("router" in earlier diagrams) has been replaced by an index_router class (labeled "Index Router" in the above image)
Explicit "index set" nodes have been added, which are responsible for reacting to data-cell indices belonging to a specific layer
Caching has been removed from all nodes except any nodes that require joining two or more arguments:
For nodes with two or more products that belong to the same data layer, a multilayer_join_node is created in such a manner that only the standard tbb::join_node<...> is used to tag-match the inputs
For nodes with two or more products that belong to different data layers, a multilayer_join_node is created with "repeaters", which cache data products from the different layers while emitting them as needed to match the other inputs for the node.
Activity
knoepfel commentedon Nov 14, 2025
Introducing repeaters
The following workflow shows a node$p$ from each run (indexed by $i$ ), and a data product $x$ from each spill in each run, which is indexed by the pair $(i, j)$ .
consumethat uses a data productFor example, in run 4, the data-product$p_4$ is paired with each data product $x_{4,j}$ when presented to the $p_4$ data product when paired with another data product that is presented to
consumenode. It is difficult in oneTBB's flow graph to "repeat" theconsumeat a different cadence.One solution, however, is to use a "repeater" node, which is a kind of unfold node. Because an unfold node generates one or more data products per input data product, the repeater node simply emits the same data product multiple times until an end token is received (checking that the right number of repetitions has occurred).
The following shows a data-flow graph that supports repeater nodes:
Note that 2 additional nodes are created (the repeater itself, and a node for sending the end token), and extra edges are added so that the repeater knows how often it should repeat the data product (the connection between$I(spill)$ and the $iter$ port).
An implementation of this scheme is exercised in #118.
knoepfel commentedon Feb 4, 2026
Tasks:
knoepfel commentedon Feb 18, 2026
The eventual solution chosen was to introduce an entity whose purpose is to emit the correct message IDs that can be used by repeaters.
Important changes wrt. the current implementation:
multiplexer("router" in earlier diagrams) has been replaced by anindex_routerclass (labeled "Index Router" in the above image)multilayer_join_nodeis created in such a manner that only the standardtbb::join_node<...>is used to tag-match the inputsmultilayer_join_nodeis created with "repeaters", which cache data products from the different layers while emitting them as needed to match the other inputs for the node.knoepfel commentedon Feb 24, 2026
Migrating the fold-result caching to using the
multilayer_join_nodeis now a separate issue (#359).