使用TPL-Dataflow进行聚合和联接(内部,外部,左侧,...)? [英] Aggregation and Joins (Inner, Outer, Left, ...) with TPL-Dataflow?

查看:84
本文介绍了使用TPL-Dataflow进行聚合和联接(内部,外部,左侧,...)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在TPL-Dataflow网格中,是否有比使用BatchBlock缓冲所有项目直到完成,将它们作为集合发出,然后使用转换块进行实际聚合的更好的方法来实现诸如TPL-Dataflow网格内的聚合的功能?

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?

类似地,是否有其他方法可以对两个数据集进行内部/外部/左侧/右侧联接,而无需使用BatchedJoinBlock来缓冲两个数据源的所有项,将它们作为两个集合的元组发出,然后执行实际加入了Transform块?

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?

推荐答案

. TPL Dataflow中没有开箱即用的机制,因为聚合和联接操作与flowing无关,它们与查询数据有关.

No. There is no such mechanism out-of-the-box in TPL Dataflow, as aggregation and joining operations aren't about flowing, they are about querying the data.

但是,由于块是完全适合RX,则可以使用

However, as the blocks are perfectly fit with RX library, you can use the Join Patterns in Rx paradigm while aggregating your data.

更多相关链接:

  • Aggregation in Rx
  • Reactive Extensions for .NET (Rx): Take action once all events are completed
  • Guide to System.Reactive.Joins

这篇关于使用TPL-Dataflow进行聚合和联接(内部,外部,左侧,...)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆