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

微服务与事件驱动架构

by Adam Bellemare
October 2021
Beginner to intermediate
250 pages
7h 11m
Chinese
Posts & Telecom Press
Content preview from 微服务与事件驱动架构
将事件驱动架构与现有系统集成
51
数据存储外的非范式化
变更日志只包含事件数据。一些变更数据捕获机制可以从物化视图中提取数据,但是对
大多数情况来说,在数据存储外部必须进行数据的非范式化,否则可能会产生高度范式
化的事件流,这就需要下游微服务处理外键连接和非范式化。
数据集 schema 和输出事件 schema 之间脆弱的依赖关系
与基于查询的数据解放过程很相似,基于二进制日志的解放过程存在于数据存储应用程
序之外。合法的数据存储变更,比如更改数据集或重新定义字段类型,可能会与事件
schema
的特定演化规则完全不兼容。
4.6
 使用发件箱表解放数据
发件箱表包含对数据存储的内部数据所做的重要修改,每个重要的更新都被存储为单独的
一行记录。一旦对标记为需要做变更数据捕获的数据存储表做出插入、更新或删除操作,
就会往发件箱表写入一条对应的记录。处于变更数据捕获下的每个表都有自己的发件箱
表,或者有一个单独的发件箱表记录所有表的变更(稍后再讨论)。
内部表的更新和发件箱表的更新必须绑定到
一个事务
中,这样每次更新只有在整个事务成
功时才会发生。如果不这样做,可能最终导致很难达成“让事件流作为单一事实来源”的
目标,而这是很难检测和修复的。该模式是一种更具侵入性的变更数据捕获方法,因为它
需要对数据存储层和应用层进行改动,而这些改动都需要数据存储开发人员的参与。发件
箱表模式利用数据存储的持久性为等待发布到外部事件流的事件提供了预写入日志。
内置的变更数据表
有些数据库,比如
SQL Server
,不提供变更数据捕获日志,而 ...
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