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

微服务与事件驱动架构

by Adam Bellemare
October 2021
Beginner to intermediate
250 pages
7h 11m
Chinese
Posts & Telecom Press
Content preview from 微服务与事件驱动架构
将事件驱动架构与现有系统集成
49
间歇捕获
数据只能在间歇性轮询中同步,这样对同一个记录的多次独立变更只能体现为一个
事件。
生产资源消耗
查询使用底层系统资源来执行,这会在生产系统上造成不可接受的时延。使用只读副本
可以减轻此问题,但会带来额外的财务成本和系统复杂性。
数据变更导致的查询性能变化
查询和返回的数据量取决于对底层数据所做的变更。在最坏的情况下,每次都会更改整
个数据集。如果某次查询在下一次查询开始时仍未结束,则会出现竞争状态。
4.5
 使用变更数据捕获日志解放数据
解放数据的另一种模式是使用数据存储底层的
变更数据
捕获日志(
MySQL
中叫
二进制
志,
PostgreSQL
预写式
日志)作为信息源。这是一种只追加数据的日志结构,它会详
细记录被跟踪的数据集随时间推移所发生的所有变更。这些变更既包括对记录的创建、删
除和更新,也包括对数据集及其
schema
的创建、删除和更新。
变更数据捕获的技术选项比基于查询的捕获要少。不是所有的数据存储都有实现一份关
于数据变更的持久日志,而在那些支持此能力的数据存储中,也不是全部都有现成的
连接器可用于提取数据。这种方法主要适用于选择型的关系型数据库,比如
MySQL
PostgreSQL
但是任何具有一套完整的变更日志的数据存储都适用此方法。许多其他现代
数据存储有公开事件
API
,此
API
可充当物理预写入日志的代理
。例如,
MongoDB
提供
了一个变更流接口,而
Couchbase
通过其内部复制协议提供了复制访问。
数据存储的日志不太可能包括从开始到现在的所有变更 ...
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