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

微服务与事件驱动架构

by Adam Bellemare
October 2021
Beginner to intermediate
250 pages
7h 11m
Chinese
Posts & Telecom Press
Content preview from 微服务与事件驱动架构
将事件驱动架构与现有系统集成
45
件流的同步。事件流会与遗留应用程序的内部数据集达到最终一致,如图
4-4
所示。
应用程序1 应用程序2
解放的事件流
物化表 物化表
偏移量
K V
A 10
K=A
V=0
K=B
V=20
K=C
V=30
K=A
V=10
B 20
C 30
K V
A 10
B 20
C 30
4-4:在两个服务之间解放并物化状态
4.1.2
 将被解放的数据转化成事件
与任何其他事件一样,被解放的数据也要遵循第
3
章中介绍的结构化建议。定义良好的
事件流的一个特点是,它所包含的事件有一个显式定义的、可演化的兼容
schema
。作为
schema
定义的数据契约的一部分
,应该确保消费者有基本的数据质量保证。对
schema
变更只能根据演化规则来进行。
在整个组织中对被解放的事件数据和原始的事件数据采用相同标准的格式。
根据定义,在业务中与业务最相关且常用的数据就是需要被解放的数据。对数据源的数据
定义做出更改,比如创建新的字段、更改现有字段或删除其他字段等,可能导致动态变更
数据操作传播到下游消费者。如果不能为解放的数据使用显式定义的
schema
,那么将迫使
下游消费者解决所有不兼容问题。这对提供单一事实来源来说是很困难的,因为下游消费
者不应该试图自己解析数据。提供可靠的数据以及最新的
schema
并仔细考虑数据随时间
的演变,这一点非常重要。
4.2
 数据解放模式
3
种主要的数据解放模式可用于从底层数据存储中提取数据。因为解放数据意味着要形
成新的单一事实来源,所以它必须包含数据存储中的全部数据集合。此外,新的插入、更 ...
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