diff --git a/notes/流处理.md b/notes/流处理.md new file mode 100644 index 0000000..ec7a1c2 --- /dev/null +++ b/notes/流处理.md @@ -0,0 +1,39 @@ +## 二、流处理 + +### 2.1 静态数据架构 + +在流处理之前,数据通常存储在数据库,文件系统或其他形式的存储系统中。应用程序根据需要查询数据或计算数据。这就是传统的静态数据处理架构。Hadoop采用HDFS进行数据存储,采用MapReduce进行数据查询或分析,这就是典型的静态数据处理架构。 + +![01_data_at_rest_infrastructure](D:\BigData-Notes\pictures\01_data_at_rest_infrastructure.png) + + + +### 2.2 流处理 + +而流处理则是直接对运动中的数据的处理,在接收数据时直接计算数据。 + +大多数数据都是连续的流:传感器事件,网站上的用户活动,金融交易等等 ,所有这些数据都是随着时间的推移而创建的。 + +接收和发送数据流并执行应用程序或分析逻辑的系统称为**流处理器**。流处理器的基本职责是确保数据有效流动,同时具备可扩展性和容错能力,Storm和Flink就是其代表性的实现。 + +![02_stream_processing_infrastructure](D:\BigData-Notes\pictures\02_stream_processing_infrastructure.png) + + + +流处理带来了静态数据处理所不具备的众多优点: + + + +- **应用程序立即对数据做出反应**:降低了数据的滞后性,使得数据更具有时效性,更能反映对未来的预期; + +- **流处理可以处理更大的数据量:**直接处理数据流,并且只保留数据中有意义的子集,并将其传送到下一个处理单元,逐级过滤数据,降低需要处理的数据量,从而能够承受更大的数据量; + +- **流处理更贴近现实的数据模型**:在实际的环境中,一切数据都是持续变化的,要想能够通过过去的数据推断未来的趋势,必须保证数据的不断输入和模型的不断修正,典型的就是金融市场、股票市场,流处理能更好的应对这些数据的连续性的特征和及时性的需求; + +- **流处理分散和分离基础设施:**流式处理减少了对大型数据库的需求。相反,每个流处理程序通过流处理框架维护了自己的数据和状态,这使得流处理程序更适合微服务架构。 + + + +## 参考资料 + +1. [What is stream processing?](https://www.ververica.com/what-is-stream-processing) \ No newline at end of file diff --git a/pictures/01_data_at_rest_infrastructure.png b/pictures/01_data_at_rest_infrastructure.png new file mode 100644 index 0000000..af3d2ec Binary files /dev/null and b/pictures/01_data_at_rest_infrastructure.png differ diff --git a/pictures/02_stream_processing_infrastructure.png b/pictures/02_stream_processing_infrastructure.png new file mode 100644 index 0000000..1c62c5a Binary files /dev/null and b/pictures/02_stream_processing_infrastructure.png differ