Skip to Content
微服务与事件驱动架构
book

微服务与事件驱动架构

by Adam Bellemare
October 2021
Beginner to intermediate
250 pages
7h 11m
Chinese
Posts & Telecom Press
Content preview from 微服务与事件驱动架构
138
10
白天,可以上线更多的处理实例以处理增加的事件负载。在此场景中,数据存储的查询率
也会增加,但是缓存、分区和批处理等有助于将负载保持在低于跟随处理需求线性增长所
要求的值。
谷歌、亚马逊和微软等服务供应商提供了高度可伸缩的按读
/
写收费的数据
存储,这非常适用于此模式。
10.2
 具有外部流处理的混合
BPC
应用程序
BPC
微服务还可以利用外部流处理系统来完成本地可能难以完成的工作。这是一种混合的
应用程序模式,业务逻辑分布在
BPC
和外部流处理框架之间
。第
11
章要介绍的重量级框
架是这方面的优秀候选,因为它们可以通过简单的集成提供大规模流处理。
BPC
实现可以让程序具备原本不具有的操作能力
,同时仍然可以使用所有必要的原有语言
特性和库。例如,你可以使用外部流处理框架执行跨多个事件流的复杂聚合操作,同时使
BPC
微服务将结果填充到本地数据存储并提供“请求
响应”查询。
示例
使用外部流处理框架来联结事件流
假设
BPC
服务需要使用流处理框架的联结能力(流处理框架擅长于联结物化事件流的大
型集合)。外部流处理器可以简单地将事件流物化到表,并将具有相同键的行联结到一起。
这个简单的联结操作如图
10-4
所示。
物化表
“numbers”
联结的输出事件流
联结
物化表
“greetings”
值键 值键
10-4:流处理框架大规模执行的典型外包操作
基础的生产者和消费者微服务
139
混合的
BPC
需要使用兼容的客户端来启用在外部事件流处理框架上的工作。这个客户端
会把代码转换成框架的指令,框架本身会处理消费、联结并生成事件到联结的输出事件流 ...
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

监控运维实践:原则与策略

监控运维实践:原则与策略

Mike Julian
Kafka权威指南

Kafka权威指南

Neha Narkhede, Gwen Shapira, Todd Palino
Web容量规划之美

Web容量规划之美

Arun Kejariwal, John Allspaw

Publisher Resources

ISBN: 9787115571106