Google 数据流与 Apache Storm

Google Dataflow vs Apache Storm

阅读Google的数据流API,我的印象是它与Apache Storm 所做的非常相似。通过流水线流进行实时数据处理。除非我完全忽略了这里的要点,否则我不会在如何执行针对彼此编写的管道上架起桥梁,而是期待与 Google 不同的东西,而不是重新发明轮子。 Apache Storm 已经很好地适用于任何编程语言。这样做的真正价值是什么?

不,这些是完全不同的框架。 Dataflow 是 Fl​​umeJava 的继任者,就像 Crunch 和 Spark 一样。它确实映射到 Spark。 Spark 的 Streaming 项目映射到 Dataflow 的 Streaming 支持,它们都是 Storm(+ Trident)最接近的类比。但它实际上是一个映射到 Storm 的 Dataflow。

与 Storm + Trident 相比,Spark Streaming 和 Dataflow 的流式处理更像是彼此。如果您在线阅读 Spark Streaming 和 Storm 的任何比较,它也将主要适用于 Dataflow。

Dataflow 流式处理的一个好处是它与非流式处理核心额外集成。数据流大多与流媒体无关; Storm 正在流式传输。

感谢您对 Dataflow 编程模型的关注!的确,Dataflow 和 Apache Storm 都支持流处理,但有重要的区别:

  • Dataflow同样支持batch和streaming计算"windowing"API,而Storm据我所知是专门的streaming系统

  • Dataflow 和 Storm 中用于定义计算拓扑的 API 非常不同。数据流 API 在很大程度上模仿 FlumeJava:您可以像操作真实集合一样操作逻辑 PCollection 对象(并行集合;您可以将它们视为逻辑数据集),并且从将不同的可并行化操作(例如 ParDo)应用于其他集合的结果构建新集合。相反,在 Apache Storm 中,您直接从 "spouts" 和 "bolts" 构建计算网络;据我所知,没有逻辑数据集或并行操作的明确概念。

  • Dataflow 中管道的逻辑表示允许框架执行类似于数据库系统中查询优化器所做的优化,例如避免或引入某些中间结果的具体化,四处移动或消除按键分组操作等。您可以在 FlumeJava 论文中看到这些优化的概述。这在批处理和流式处理模式下都很有用。

  • Dataflow和Storm的流计算模型的一致性保证是不同的。这其实是一个引人入胜的话题!我建议阅读 Millwheel paper (which is what the streaming part of Dataflow is based on) for an overview of the fault tolerance and consistency concerns in a streaming system. I believe the paper briefly compares Millwheel with Storm too. You can find a more extensive discussion of the importance of consistency guarantees in streaming systems, and the power of the consistency given by Dataflow, in the talk Have Your Cake and Eat It Too -- Further Dispelling the Myths of the Lambda Architecture.

  • 作为 Google 云平台的一部分,Dataflow 的主要价值主张之一是零麻烦:您无需设置集群、设置监控系统等:您只需将您的管道提交到云端 API,系统就会为其分配资源,使用它们执行您的管道,并为您监控。不过,这可能与您关于编程模型相似性的问题无关。