Skip to Content
Kafka权威指南
book

Kafka权威指南

by Neha Narkhede, Gwen Shapira, Todd Palino
January 2018
Beginner to intermediate
234 pages
7h 8m
Chinese
Posts & Telecom Press
Content preview from Kafka权威指南
流式处理
185
11.1
 什么是流式处理
人们对流式处理的理解非常混乱。因为有太多关于流式处理的定义,它们混淆了实现细
节、性能需求、数据模型和软件工程的各个方面。笔者亲眼目睹了发生在关系型数据库上
的类似窘境,关系模型的抽象定义总是夹杂了数据库引擎的实现细节和特定局限性。
流式处理领域还处在发展阶段,有一些流行的实现方案,其处理方式可能很特别,或者有
特定的局限,但这并不能说明它们的实现细节就是流式处理固有的组成部分。
先来看看什么是数据流(也被称为“事件流”或“流数据”)。首先,数据流是无边界数据
集的抽象表示。无边界意味着无限和持续增长。无边界数据集之所以是无限的,是因为随
着时间的推移,新的记录会不断加入进来。这个定义已经被包括
Google
Amazon
在内的
大部分公司所采纳。
这个简单的模型(事件流)可以表示很多业务活动,比如信用卡交易、股票交易、包裹
递送、流经交换机的网络事件、制造商设备传感器发出的事件、发送出去的邮件、游戏
里物体的移动,等等。这个清单是无穷无尽的,因为几乎每一件事情都可以被看成事件
的序列。
除了没有边界外,事件流模型还有其他一些属性。
事件流是有序的
事件的发生总是有个先后顺序。以金融活动事件为例,先将钱存进账户后再花钱,这与
先花钱再还钱的次序是完全不一样的。后者会出现透支,而前者不会。这是事件流与数
据库表的不同点之一。数据库表里的记录是无序的,而
SQL
语法中的
order by
并不是
关系模型的组成部分,它是为了报表查询而添加的。
不可变的数据记录
事件一旦发生,就不能被改变。一个金融交易被取消,并不是说它就消失了,相反,这 ...
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

精通機器學習

精通機器學習

Aurélien Géron
精通特征工程

精通特征工程

Alice Zheng, Amanda Casari
高效能PYTHON程式設計

高效能PYTHON程式設計

Micha Gorelick, Ian Ozsvald

Publisher Resources

ISBN: 9787115473271