Changeset Merging Rules for Distributed Data Consistency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In distributed computing environments, conflicts arise when multiple mobile devices independently make changes to shared data due to latency in communication with the server, leading to inconsistencies and conflicts that existing technologies struggle to resolve effectively.
Innovation Solution
The solution involves generating changesets for data manipulation operations, synchronizing them between devices, and merging these changesets using defined rules based on the type of operation and timestamp, ensuring data consistency across all devices by designating a winner in conflicts, such as prioritizing operations with later timestamps.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If multiple mobile devices independently make changes to shared data due to network latency, then device operation autonomy is improved, but data consistency deteriorates
Solution Approach 1:
The system performs preliminary actions by capturing and queuing data manipulation operations locally before network communication occurs. Each device maintains a local queue of operations that can be executed independently, allowing the device to operate autonomously even when offline. This preliminary local execution resolves the contradiction by enabling device autonomy while deferring consistency concerns to a later synchronization phase.
Solution Approach 2:
The server acts as an intermediary that mediates between multiple devices making independent changes. It receives operations from multiple sources, stores them in a chronological queue, and distributes them back to devices. This intermediary mechanism resolves the data consistency problem by providing a centralized coordination point that reconciles conflicting operations while preserving the autonomy of individual devices.
2Loss of time
If changesets are merged using timestamp-based rules, then conflict resolution speed is improved, but flexibility in handling complex conflicts deteriorates
Solution Approach 1:
The system segments conflicts into different types (conflicting operations vs. non-conflicting operations) and applies different resolution strategies to each segment. For conflicting operations on the same data object, timestamp-based rules provide quick resolution. For non-conflicting operations, the system applies them directly without complex resolution logic. This segmentation maintains fast resolution for the common case while preserving flexibility for handling diverse conflict scenarios.
Solution Approach 2:
The system changes parameters of operations by attaching metadata such as operation types, data object identifiers, and timestamps to each changeset. These parameter changes enable the merging logic to quickly compare and resolve conflicts based on objective criteria rather than requiring complex contextual analysis, thus improving resolution speed while maintaining adaptability through rich operation descriptors.
3Stability of the object's composition
If all devices synchronize with the server frequently, then data consistency is improved, but network bandwidth consumption increases
Solution Approach 1:
The system extracts only the essential synchronization information (operation queues and timestamps) that devices need to exchange with the server, rather than transmitting complete data sets. Devices send compact representations of their local changes and receive only the differential updates they need. This extraction approach maintains data consistency by synchronizing critical information while minimizing network bandwidth consumption.
Solution Approach 2:
Instead of continuous synchronization, the system implements periodic action by allowing devices to operate independently and synchronize at designated intervals or trigger events. Devices can accumulate local changes and batch them into periodic synchronization cycles, reducing the frequency of network communications while maintaining consistency through structured conflict resolution at each synchronization point.
Data Source
AI summary
Disclosed is a system and method for resolving conflicts that arise in changes made to data by multiple client devices. A data manipulation operation is represented as a changeset, which has instructions for performing an operation on the data. When two client devices perform operations that change the state of a data object, a changeset is generated at each of the two client devices. These changesets are merged at each of the two client devices based on merging rules that resolve any conflict between the operations. The rules ensure that the data at each of the multiple client devices will eventually be consistent.


