Is there any better way to implement functions like aggregation within a TPL-Dataflow mesh than using a BatchBlock
to buffer all items until completion, emit them as a collection and then use a transform block to do the actual aggregation?
Similarly, is there any other way to do an inner/outer/left/right join of two datasets without using a BatchedJoinBlock
to buffer all items of both datasources, emit them as a tuple of two collections and then do the actual join with a Transform block?
No. There is no such mechanism out-of-the-box in
TPL Dataflow
, as aggregation and joining operations aren't aboutflowing
, they are about querying the data.However, as the blocks are perfectly fit with
RX
library, you can use the Join Patterns in Rx paradigm while aggregating your data.More related links:
Rx