Today’s businesses, especially those that prioritize digital transformation, are in dire need of real-time data. Traditional weekly and monthly batch processing can no longer meet demand. However, it is not easy to obtain real-time data from multiple sources and use it to automate processes and dynamically optimize decisions.
Recently, we encountered a challenge when re-architecting a customer's legacy system and splitting the monolithic architecture into microservices. We started making changes to the database and modernizing the system by module. At this stage, we need to ensure that both databases remain in sync, as different modules may require the same data - in other words, the old system requires data generated by the new system in the new database, and vice versa.
We researched Change Data Capture (CDC) technology to determine if it fit our needs. The article details the definition of CDC, the tools we tested, how they work and their advantages. At the same time, we shared some cases and suggestions to help other technicians choose the appropriate CDC tool in specific situations.
What is change data capture?
Data capture refers to the process of detecting and capturing changes in the source system and then delivering these changes to the target system in near real-time. These changes may include insert, delete, update operations, and DDL changes to the database structure.
How change data capture tools work
CDC tools implement their functions by monitoring data changes in the source system. Once a change is discovered, the CDC tool captures and records it in a designated location, such as a database or log file. The processed and transformed data is then loaded into a target system, such as a data warehouse or analytics platform.
There are many ways to capture database changes. Let’s take a look at some of them:
1. Timestamp/query based
In this method, we will maintain some audit columns similar to CREATED_AT, LAST_UPDATED or DATE_MODIFIED in the source and detect changes in these columns by querying the data in the source to capture any data changes . It should be noted that this method does not record deletion operations.
2. Trigger-based
A trigger is a function in the database that performs operations based on specific events. Although useful for capturing any change, including delete operations, it reduces database performance because each event requires multiple writes.
3. Log-based
The database contains a transaction log for recovery in the event of a crash, storing all events. With log-based CDC, new database transactions are read directly from the native log, which allows changes to be captured without scanning the source table and is therefore more efficient.
This approach is similar to event sourcing in event-driven architecture. Whenever the system state changes, we record it as an event. The recorded events can be replayed in the same order to reconstruct the system state at any time.
Why use CDC?
CDC is critical in many scenarios depending on the situation, application, architecture and business needs. Here are some of the ways the CDC helps with the engineering process:
- Real-time data availability: CDC tools capture changes in near real-time, ensuring the latest data is available for analysis, reporting, or further processing.
- Faster Decision Making: CDC helps reduce the delay between capture and data availability, enabling faster analysis and decision making.
- Efficient data integration: CDC tools help capture data from multiple operational sources and convert it into a common format in a single target database or data lake.
- Custom design of target database: CDC provides cross-functional benefits such as creating read-only search or query databases in CQRS systems, creating audit databases, or capturing data in data warehouses. It allows for decoupling non-functional and architectural requirements from the primary data store.
- Simplified data migration: In our case, CDC helps maintain data consistency between legacy and new databases during the modernization phase. This applies to various other data migration scenarios as well.
How to choose the right CDC tool?
There are several CDC tools on the market, such as Oracle Golden Gate, Debezium, IBM Infosphere, Striim, StreamSets and Qlik Replicate. These tools can be open source or paid. They typically support on-premises and cloud environments and can handle a variety of data sources. When choosing, consider the following:
- Compatibility with data sources: At a minimum, the tool you choose must be compatible with all data sources you want to capture changes to.
- Real-time data capture: Tools should capture changes in near real-time so that you can work with the latest data.
- Data conversion and integration: CDC tools should be able to handle data conversion from source to target data types.
- Price: CDC tools must be cost-effective for your use case. There are open source, paid and licensed products available.
- Ease of use and support: The tool should be easy to use for your team and provide adequate support, including comprehensive documentation and technical support.
- Other features: Depending on your needs, you may also want to check out other specific features, such as two-way synchronization between source and destination and cloud support.
As businesses become technology-driven, historical and current data will become a critical differentiator. Achieving accurate, timely, efficient and cost-effective change data capture will be an important part of any technology transformation initiative. When you face this situation, I hope this article can help you.
The above is the detailed content of Change Data Capture: Overview, Why, and Best Practices. For more information, please follow other related articles on the PHP Chinese website!

译者 | 布加迪审校 | 孙淑娟目前,没有用于构建和管理机器学习(ML)应用程序的标准实践。机器学习项目组织得不好,缺乏可重复性,而且从长远来看容易彻底失败。因此,我们需要一套流程来帮助自己在整个机器学习生命周期中保持质量、可持续性、稳健性和成本管理。图1. 机器学习开发生命周期流程使用质量保证方法开发机器学习应用程序的跨行业标准流程(CRISP-ML(Q))是CRISP-DM的升级版,以确保机器学习产品的质量。CRISP-ML(Q)有六个单独的阶段:1. 业务和数据理解2. 数据准备3. 模型

人工智能(AI)在流行文化和政治分析中经常以两种极端的形式出现。它要么代表着人类智慧与科技实力相结合的未来主义乌托邦的关键,要么是迈向反乌托邦式机器崛起的第一步。学者、企业家、甚至活动家在应用人工智能应对气候变化时都采用了同样的二元思维。科技行业对人工智能在创建一个新的技术乌托邦中所扮演的角色的单一关注,掩盖了人工智能可能加剧环境退化的方式,通常是直接伤害边缘人群的方式。为了在应对气候变化的过程中充分利用人工智能技术,同时承认其大量消耗能源,引领人工智能潮流的科技公司需要探索人工智能对环境影响的

Wav2vec 2.0 [1],HuBERT [2] 和 WavLM [3] 等语音预训练模型,通过在多达上万小时的无标注语音数据(如 Libri-light )上的自监督学习,显著提升了自动语音识别(Automatic Speech Recognition, ASR),语音合成(Text-to-speech, TTS)和语音转换(Voice Conversation,VC)等语音下游任务的性能。然而这些模型都没有公开的中文版本,不便于应用在中文语音研究场景。 WenetSpeech [4] 是

条形统计图用“直条”呈现数据。条形统计图是用一个单位长度表示一定的数量,根据数量的多少画成长短不同的直条,然后把这些直条按一定的顺序排列起来;从条形统计图中很容易看出各种数量的多少。条形统计图分为:单式条形统计图和复式条形统计图,前者只表示1个项目的数据,后者可以同时表示多个项目的数据。

arXiv论文“Sim-to-Real Domain Adaptation for Lane Detection and Classification in Autonomous Driving“,2022年5月,加拿大滑铁卢大学的工作。虽然自主驾驶的监督检测和分类框架需要大型标注数据集,但光照真实模拟环境生成的合成数据推动的无监督域适应(UDA,Unsupervised Domain Adaptation)方法则是低成本、耗时更少的解决方案。本文提出对抗性鉴别和生成(adversarial d

数据通信中的信道传输速率单位是bps,它表示“位/秒”或“比特/秒”,即数据传输速率在数值上等于每秒钟传输构成数据代码的二进制比特数,也称“比特率”。比特率表示单位时间内传送比特的数目,用于衡量数字信息的传送速度;根据每帧图像存储时所占的比特数和传输比特率,可以计算数字图像信息传输的速度。

数据分析方法有4种,分别是:1、趋势分析,趋势分析一般用于核心指标的长期跟踪;2、象限分析,可依据数据的不同,将各个比较主体划分到四个象限中;3、对比分析,分为横向对比和纵向对比;4、交叉分析,主要作用就是从多个维度细分数据。

数据科学和机器学习正变得越来越流行,这个领域的人数每天都在增长。这意味着有很多数据科学家在构建他们的第一个机器学习模型时没有丰富的经验,而这也是错误可能会发生的地方。近日,软件架构师、数据科学家、Kaggle 大师 Agnis Liukis 撰写了一篇文章,他在文中谈了谈在机器学习中最常见的一些初学者错误的解决方案,以确保初学者了解并避免它们。Agnis Liukis 拥有超过 15 年的软件架构和开发经验,他熟练掌握 Java、JavaScript、Spring Boot、React.JS


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 English version
Recommended: Win version, supports code prompts!

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)
