Streaming Systems

Tyler Akidau

出版时间

2017-10-25

ISBN

9781491983874

文件格式

PDF

评分

★★★★★

标签

编程

内容简介

这本书最独特的价值,在于它不教你任何具体框架,而是帮你建立流式计算的

作者简介

Tyler Akidau is a senior staff software engineer at Google, where he is the technical lead for the Data Processing Languages & Systems group, responsible for Google's Apache Beam efforts, Google Cloud Dataflow, and internal data processing tools like Google Flume, MapReduce, and MillWheel. His also a founding member of the Apache Beam PMC. Though deeply passionate and vocal about the capabilities and importance of stream processing, he is also a firm believer in batch and streaming as two sides of the same coin, with the real endgame for data processing systems the seamless merging between the two. He is the author of the 2015 Dataflow Model paper and the Streaming 101 and Streaming 102 articles on the O’Reilly website. His preferred mode of transportation is by cargo bike, with his two young daughters in tow. Slava Chernyak is a senior software engineer at Google Seattle. Slava spent over five years working on Google’s internal massive-scale streaming data processing systems and has since become involved with designing and building Windmill, Google Cloud Dataflow's next-generation streaming backend, from the ground up. Slava is passionate about making massive-scale stream processing available and useful to a broader audience. When he is not working on streaming systems, Slava is out enjoying the natural beauty of the Pacific Northwest. Reuven Lax is a senior staff software engineer at Google Seattle, and has spent the past nine years helping to shape Google's data processing and analysis strategy. For much of that time he has focused on Google's low-latency, streaming data processing efforts, first as a long-time member and lead of the MillWheel team, and more recently founding and leading the team responsible for Windmill, the next-generation stream processing engine powering Google Cloud Dataflow. He's very excited to bring Google's data-processing experience to the world at large, and proud to have been a part of publishing both the MillWheel paper in 2013 and the Dataflow Model paper in 2015. When not at work, Reuven enjoys swing dancing, rock climbing, and exploring new parts of the world.

AI 导读

编辑书评
  • 《Streaming Systems》并非一本教你如何使用Flink或Beam的代码手册,而是一部关于“如何在不可靠的网络与无序的时间中构建确定性结果”的哲学著作。其独特价值在于将Google内部多年沉淀的Dataflow模型进行了极致的通俗化拆解,特别是“流表对偶”这一概念,彻底重构了我们对实时数据的认知范式。然而,本书的局限同样明显:作者在阐述概念时有时过于追求修辞上的完美,导致技术干货被稀释;且在Watermark等硬核章节,文字描述的线性逻辑难以匹配非线性的时间语义,造成较高的认知负荷。因此,它更适合那些已经踩过坑、渴望从底层逻辑上打通任督二脉的中高级工程师,而非寻求快速上手的新手。
  • 在同类书籍中,本书胜在“道”而非“术”。相较于市面上大量聚焦于特定框架配置与调优的工具书,Akidau等人提供了更持久的知识资产——即一套通用的流处理思维模型。即便未来主流框架发生更迭,书中关于事件时间、触发器策略及一致性保证的原理依然有效。值得推荐的是,它将复杂的分布式问题还原为简单的直觉类比(如用“等待迟到的朋友”解释Watermark),极大地降低了入门门槛。尽管存在篇幅冗长和部分章节晦涩的问题,但其对行业标准的定义权使其成为必读经典。建议读者将其作为案头参考书,在实际遇到流处理疑难杂症时,回归本书寻找第一性原理的答案,而非从头到尾机械阅读。
核心看点
  • 本书由Google Dataflow/Beam模型核心作者撰写,系统性地解构了流式计算的底层逻辑。它超越了具体框架(如Flink或Spark)的API层面,深入探讨了“What, Where, When, How”四个维度的数据处理本质,特别是事件时间与处理时间的区别、窗口触发机制以及水印(Watermark)在解决乱序数据中的关键作用,为读者构建了统一的概念模型。
  • 书中极具洞察力地阐述了“流与表的对偶性”(Stream-Table Duality),指出无界数据流可以被视为不断变化的表,而有界表则是流的快照。这一视角不仅简化了对复杂分布式状态管理的理解,还解释了为何现代流处理系统能够支持类似SQL的声明式查询,从而弥合了批处理与流处理之间的语义鸿沟,是全书理论价值的核心所在。
  • 针对Exactly-Once语义的实现难点,本书详细剖析了去重机制(如利用Bloom Filter优化性能)和端到端一致性保证的挑战。作者强调单纯依赖完整性概念无法同时获得低延迟和高正确性,必须结合重复更新触发器与精确的状态管理。这部分内容对于构建高可靠性的实时数据管道具有极高的工程指导意义,直击生产环境痛点。
读者共识
  • 读者普遍认可该书对流式计算核心概念(如时间窗口、水印、流表对偶)的解释极为透彻,被誉为“神书”。许多从事RisingWave、Flink开发的工程师表示,书中的理论结论与实际项目中摸索出的最佳实践高度吻合,证实了其作为行业标准教材的地位,尤其适合在具备一定实践经验后回看。
  • 主要争议点在于可读性与篇幅。不少读者抱怨前半部分略显啰嗦,作者表达欲过强导致信息密度不均;而Watermark等核心章节又过于抽象难懂,若无外部视频辅助几乎无法独立消化。此外,有观点认为随着Flink等框架的发展,书中部分关于特定实现细节的描述已稍显过时,需结合最新源码阅读。
  • 读者一致认为本书的价值在于“平台无关性”的思维训练。虽然作者是Beam模型倡导者,但书中并未局限于Beam API,而是提炼出了适用于所有流系统的通用原则。这种从具体工具上升到抽象模型的过程,被评价为帮助程序员摆脱“调包侠”困境、真正理解分布式数据流动本质的关键一步。

精彩摘录

  • "In a healthy pipeline, most arriving records will not be duplicates. We can use that fact to greatly improve performance via Bloom filters, which are compact data structures that allow for quick set-membership checks. Bloom filters have a very interesting property: they can return false positives bu"
  • "You simply cannot get both low latency and correctness out of a system that relies solely on notions of completeness. you'll need to combine repeated update trigger"

目录

Table of Contents
Preface Or: What Are You Getting Yourself Into Here? vii
Part I The Beam Model
1 Streaming 101 3
Terminology: What Is Streaming? 4

显示全部

读者评论

让我这种大数据门外汉感觉像是在爬泰山,不过读完了就很有收获。最后的 streaming sql和streaming joins没有特别仔细看,因为从这本书出版到现在也有三年了,直接看Flink的实现应该更好。最后这本书总结说Flink的成功要素,第一点就是采纳了Dataflow/Beam的模型,这脸皮能再厚一点吗😂
回看会觉得应该值得更高,但过程中整体的阅读感和内容编排分布上还是很让人磕磕碰碰,扣一星吧。第一作者也太有表达欲和戏精了吧,不过这样的人在对外宣传和向上汇报上总是能很讨喜。毕竟谁不喜欢陌生领域里的自信与笃定。如果作者把后半部分没必要的冗杂重复,分一些到第一部分概念的实现上,那会多好。watermark 那章要不是结合作者一些会议上的 talk,简直云里雾里。虽然示例代码和图例有很多待勘误的地方,如果仔细纠结会造成一些理解偏差,但也算瑕不掩瑜了。偏爱第一部分,估计算得上 The Dataflow Model 这篇论文的详细注解吧。
前几章的动图好评
不知道这书为啥突然火了,但是对绝大数程序员来说,这本书https://book.douban.com/subject/25971366/ 更好用(虽然老了点)
对流处理的基本原理,比如时间窗口,这些的讲解很透彻,尤其是看电子版的还有动画帮助理解
前两章对 processing time 和 event time 的分析很好,watermark 一章比较难懂
一开始感觉讲的有点啰嗦和虚,后面参与了一段时间的 Flink 开发后回来看,觉得这本书对流处理 highlevel 的概念的讲解非常到位。最有收获的是对 stream and table duality 的讲解和最后一章对流处理系统发展历程的回顾。
Read part1, check his talk videos before reading ch3. Skim part2, skip ch8.
还行。 就是感觉作者英语单词有一些用的太复杂 然后有一些节奏太慢。 感觉适合作为一本教科书, 有一些地方太细了 工作中也没考虑过 估计也不需要考虑. 这个书可能更多的是讲的道的内用。 一开始,就讲了最基本的beam 模型。 然后第二部分讲的流与表的关系。 中间穿插了很多 比如想 GCP pub/sub, spark, flink 的例子, 还有很多例子用的GCP dataflow的。 主要还是讲了为什么这样做, 是怎么想的,对于流与表是怎么理解的。 没有教你怎么用spark steam 或者flink。 看看提升一下思维是不错的, 就300页。
全部深度解读 →主题书单高分榜最近更新