Outbox Message Bus Replication for Ordered Database Sync
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing data replication systems face challenges in maintaining data availability, efficiency, and reliability due to add-on services, management difficulties, and downtime, especially when ordered replication is required.
Innovation Solution
An integrated data replication system using a persistence service and replication service that interacts with a message bus to handle ordered and un-ordered alterations, ensuring efficient and reliable data replication across multiple databases.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If data is copied between different databases in different regions, then data availability is improved, but system complexity and management difficulty increase
Solution Approach 1:
The system divides data replication into two distinct segments: ordered alterations that maintain strict consistency across databases, and un-ordered alterations that allow flexible replication. This segmentation resolves the contradiction by enabling data availability through regional copying while managing complexity through differentiated replication strategies for different data types.
Solution Approach 2:
The system dynamically selects replication behavior based on alteration type. Ordered alterations trigger synchronized replication across all databases, while un-ordered alterations allow asynchronous replication. This dynamic approach improves data availability while reducing management complexity by adapting replication intensity to data requirements.
2Reliability
If ordered replication is implemented to ensure data consistency, then data reliability is improved, but replication speed and efficiency decrease
Solution Approach 1:
The system segments alterations into ordered and un-ordered categories, applying strict consistency protocols only to ordered alterations while allowing efficient asynchronous replication for un-ordered alterations. This segmentation maintains data consistency where required while preserving replication efficiency for non-critical data.
Solution Approach 2:
Different replication quality levels are applied locally based on alteration type. Ordered alterations receive high-quality synchronized replication to ensure consistency, while un-ordered alterations receive lower-quality asynchronous replication for efficiency. This local quality differentiation resolves the contradiction between reliability and productivity.
3Adaptability or versatility
If add-on services are used for data replication, then replication functionality is provided, but ease of operation and management difficulty worsen
Solution Approach 1:
The system merges the replication functionality directly into the database core architecture, eliminating the need for separate add-on services. The database engine natively supports both ordered and un-ordered replication, providing versatile replication functionality while simplifying management through unified native support rather than multiple external components.
4Reliability
If data is replicated across multiple regions, then data accessibility is improved, but downtime and failure scenarios increase
Solution Approach 1:
The system performs preliminary classification of alterations into ordered and un-ordered categories before replication. This preliminary action enables the system to prepare appropriate replication strategies in advance, reducing downtime by immediately applying the correct replication mode when failures or accessibility issues occur, rather than determining the approach during crisis response.
Data Source
AI summary
Systems and methods are provided for replicating data between different services used to update databases. One example system includes a database and a computing device coupled in communication with the database, wherein the computing device is configured to perform a create, update or delete operation on the data included in the database and to post an entry representative of the operation to an outbox data structure. The computing device is also configured to retrieve the entry from the outbox data structure; publish the entry as a first message to a message bus, thereby informing a different data system of the operation in the database; receive a second message from the message bus indicative of a create, update or delete operation at a database included in a different data system; and direct a service of the system to perform the create, update or delete operation of the second message.


