目录
第1 章 为什么使用流 ........................................................................................1
飞机、火车和汽车:车联网和物联网 .......................................................................................3
流数据:这才是现实世界 ...........................................................................................................6
什么时候需要流 ...........................................................................................................8
不止是实时:流架构的更多优势 ..............................................................................................11
流架构的最佳实践 ......................................................................................................................13
医疗数据流案例 ..........................................................................................................................14
流数据:架构设计的核心 ..........................................................................................................17
第2 章 流式架构 ...............................................................................................19
狭义视角:实时应用 ..................................................................................................................20
通用流式架构的关键问题 ..........................................................................................................21
消息传递技术的重要性 ..............................................................................................................24
实时分析工具 ..............................................................................................................................28
Apache Storm ....................................................................................................................30
Apache Spark Streaming ................................................................................................31
Apache Flink ....................................................................................................................32
Apache Apex ....................................................................................................................33
流分析功能比较 ......................................................................................................................33
小结 ..........................................................................................................................................36
第3 章 流架构:微服务的理想平台 ..............................................................37
为什么需要微服务 ..................................................................................................................38
微服务需要哪些支撑 ..............................................................................................................41
关于微服务的更多详情 ..........................................................................................................42
设计流架构:以在线视频服务为例 ......................................................................................45
新设计:支持消息传递的基础设施 ...............................................................................47
通用微架构的重要性 ..............................................................................................................49
命名问题 ..................................................................................................................................50
为什么使用分布式文件和NoSQL 数据库 ............................................................................52
视频服务的新设计 ..................................................................................................................52
小结:综合平台视角 ..............................................................................................................54
第4 章 使用Kafka 进行流传输 .....................................................................57
Kafka 的动机 ...........................................................................................................................57
Kafka 的创新 ...........................................................................................................................58
Kafka 的基本概念 ...................................................................................................................60
排序 ...............................................................................................................................61
持久化 ...........................................................................................................................62
Kafka API ....................................................................................................................................62
KafkaProducer API .............................................................................................................63
KafkaConsumer API ............................................................................................................66
遗留API ............................................................................................................................70
Kafka 实用程序 .......................................................................................................................71
负载均衡 ...........................................................................................................................71
镜像 ...................................................................................................................................72
Kafka 的陷阱 ...........................................................................................................................73
产品环境下的Kafka .........................................................................................................73
主题和分区的数目有限 ...................................................................................................74
手动均衡分区负载 ...........................................................................................................75
没有固有的序列化机制 ..................................................................................................76
镜像的不足 ......................................................................................................................77
小结 ..........................................................................................................................................78
第5 章 MapR Streams .....................................................................................79
MapR Streams 的创新 .............................................................................................................79
MapR 流系统的历史和情境 ....................................................................................................82
MapR Streams 的工作原理 ......................................................................................................84
配置MapR Streams ....................................................................................................................86
地理分布式复制 .......................................................................................................................89
MapR Streams 的陷阱 ...........................................................................................................91
第6 章 基于流数据的欺诈检测 ....................................................................93
刷卡速度 ................................................................................................................................94
快速响应决策:“这是欺诈吗” ...........................................................................................95
多用途流数据 .........................................................................................................................98
欺诈检测器的向上扩展 .........................................................................................................99
小结 .........................................................................................................................................101
第7 章 地理分布式数据流 .......................................................................... .103
利益相关者 .............................................................................................................................104
设计目标 .................................................................................................................................106
设计选择 .................................................................................................................................106
我们的设计 ....................................................................................................................108
数据 ................................................................................................................................108
控制谁能访问流数据 ....................................................................................................109
基于流的地理分布式复制的优势 .........................................................................................110
第8 章 总结 .................................................................................................113
流式架构的优势 .....................................................................................................................115
过渡到流架构 .........................................................................................................................116
小结 .........................................................................................................................................119
附录A 附加资源 ...........................................................................................121
作者简介 .......................................................................................................125