Skip to Content
Kafka权威指南(第2版)
book

Kafka权威指南(第2版)

by Gwen Shapira, Todd Palino, Rajini Sivaram, Krit Petty
November 2022
Beginner to intermediate
346 pages
11h
Chinese
Posts & Telecom Press
Content preview from Kafka权威指南(第2版)
282
14
流式处理
这种范式是连续的、非阻塞的。流式处理填补了请求与响应范式和批处理范式之间的空
白。在请求与响应范式世界里,处理一个事件可能只需要
2
毫秒
,而在批处理范式世界
里,可能每天只处理一次数据,并且需要
8
小时才能完成
。大多数业务不要求亚毫秒级
的响应,但也不能等到第二天。大多数业务流程是持续进行的,只要业务报告保持更
新,业务产品线应用程序能够持续响应,处理流程就可以进行下去,不一定需要毫秒级
的响应。具有持续性和非阻塞特点的业务流程,比如针对可疑信用卡交易或网络发送告
警、根据供应关系实时调整价格、跟踪快递包裹,都可以选择这种范式。
需要注意的是,流式处理的定义不依赖于任何一个特定的框架、
API
或特性
。只要持续地
从一个无边界的数据集读取数据,处理它们并生成结果,就是流式处理。重点是,整个
处理过程必须是持续的。每天凌晨两点启动,从流里读取
500
条记录
,生成结果,然后结
束,这样的处理流程算不上是流式处理。
14.2
 流式处理相关概念
流式处理与其他数据处理非常相似——写一些代码来接收数据,对数据做一些处理(转
换、聚合、增强等),然后把生成的结果输出到某个地方。不过,流式处理有一些特有的
概念,那些有数据处理经验但刚开始尝试开发流式处理应用程序的人很容易混淆它们。下
面我们将试着澄清这些概念。
14.2.1
 拓扑
一个流式处理应用程序包含一个或多个处理拓扑。处理拓扑从一个或多个源数据流开始,
经过满是流处理器的图路径,直到结果被写入一个或多个目标数据流。每个流处理器都是
一个应用在事件流上的事件转换计算步骤。本书示例中使用的一些流处理器有过滤器、计 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

时间序列分析实战:基于机器学习和统计学

时间序列分析实战:基于机器学习和统计学

Aileen Nielsen
Spark机器学习实战

Spark机器学习实战

Posts & Telecom Press, Siamak Amirghodsi, Meenakshi Rajendran, Broderick Hall, Shuen Mei
写给系统管理员的Python脚本编程指南

写给系统管理员的Python脚本编程指南

Posts & Telecom Press, Ganesh Sanjiv Naik
Kubernetes编程

Kubernetes编程

Michael Hausenblas, Stefan Schimanski

Publisher Resources

ISBN: 9787115601421