Database Replication Conflict Resolution via Account Ownership
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
High latency between geographically-separated data centers in distributed systems leads to conflicts in replicated data, particularly in scenarios where multiple users access shared accounts from different locations, causing corruption and undesirable outcomes like lost data or corrupted orders.
Innovation Solution
Implementing a mechanism where all data operations for specific accounts are performed at a single data center within a given time frame, redirecting requests to that center, and asynchronously replicating changes to other centers to minimize conflicts and maintain low response times.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If conventional locking mechanisms are used to synchronize data between data centers, then data consistency is improved, but response time deteriorates due to high latency between geographically-separated data centers
Solution Approach 1:
The system performs preliminary actions by establishing optimistic replication where data changes are propagated immediately without waiting for confirmation from other data centers. Conflict detection and resolution mechanisms are pre-configured to handle potential conflicts, allowing the system to maintain data consistency while avoiding the latency overhead of conventional locking mechanisms.
Solution Approach 2:
The patent introduces an intermediary conflict resolution layer that mediates between distributed data centers. This intermediary mechanism detects conflicts after they occur and resolves them through predefined strategies, eliminating the need for continuous communication and locking between data centers, thus reducing response time while maintaining consistency.
2Loss of time
If bi-directional replication is used to keep data loosely synchronized, then response time is improved, but data conflicts increase between data centers
Solution Approach 1:
The system implements feedback mechanisms through conflict detection algorithms that monitor replicated data for inconsistencies. When conflicts are detected, the system provides feedback to trigger resolution processes, ensuring data consistency is maintained while preserving the fast response times of loose coupling. The feedback loop continuously verifies data integrity without requiring tight synchronization.
Solution Approach 2:
The patent changes the parameter of replication timing from synchronous to asynchronous, allowing data to be replicated without waiting for confirmation. It also introduces configurable conflict resolution strategies that can be adjusted based on data criticality, enabling the system to optimize between response time and consistency requirements for different data types.
3Productivity
If multiple users access shared accounts from different data centers simultaneously, then system capacity and availability are improved, but data corruption occurs due to conflicting operations
Solution Approach 1:
The system segments the global data consistency problem into local data center operations. Each data center operates independently with its own copy of the data, allowing multiple users to access from different locations simultaneously. Conflict detection and resolution are applied segment-wise to affected data elements, maintaining data integrity while preserving system capacity and availability.
Solution Approach 2:
The patent implements dynamic conflict resolution where the system adapts its behavior based on the specific conflict scenario. Different resolution strategies are applied dynamically depending on the type of conflict, data criticality, and system state. This dynamic approach allows the system to maintain data integrity while maximizing concurrent user access across multiple data centers.
Data Source
AI summary
A distributed system of data centers is configured to ensure that all data operations involving specific accounts are performed within a given time frame at only one data center. Once a data center has begun accessing data that is associated with an account, all requests to access or manipulate data for that account are redirected to that data center for a period of time. Thus, the data center becomes not only the “owner” of all data associated with the account for that period of time, but also the servicer of all requests associated with the account. The data center then asynchronously replicates changes to the data associated with the account to the other data centers. Since none of the other data centers are permitted to change the data associated with the account, conflicts in the replicated data are minimized.


