Graph-Based CRDT Merging for Consistent Distributed Data

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing data synchronization techniques using conflict-free replicated data types (CRDTs) often result in inconsistent combined states across devices due to the independent updating of replicas, particularly when dealing with deletions and reinsertions of data nodes.

Innovation Solution

A data model represented as a rooted directed graph with CRDTs, where each data node has a unique identifier and supports offline operations, undo/redo capabilities, and resolves inconsistencies through causal consistency and timestamp-based merging to ensure a consistent data state across devices.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If replicas are updated independently and concurrently without coordination, then device autonomy and offline operation capability are improved, but data consistency across devices deteriorates

Engineering Contradiction:
Improveoffline operation capabilityVSAvoiddata consistency
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent introduces a server as an intermediary that collects data models from multiple devices, merges them using CRDT operations, and distributes the merged result back to devices. This mediator resolves the consistency issue while allowing devices to operate autonomously offline, as the server handles the complex merging logic when devices reconnect.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent transforms the data structure into a graph-based model with nodes and edges, where each node represents a data object and edges represent relationships. This parameter change in data representation enables sophisticated merging operations that can handle deletions, reinsertions, and structural changes while maintaining consistency across independently updated replicas.

Inventive Principle:
Principle #35Parameter changes

2Ease of operation

If data nodes are deleted and reinserted independently at different devices, then device autonomy is maintained, but inconsistency in data structure state occurs

Engineering Contradiction:
Improveindependent updatingVSAvoiddata structure consistency
Core Design Contradiction:
Ease of operationVSManufacturing precision

Solution Approach 1:

The patent implements a feedback mechanism where devices exchange data models with the server, which detects inconsistencies (such as deleted nodes being reinserted) and resolves them by comparing timestamps and operation histories. The server sends corrected data models back to devices, providing feedback that ensures structural consistency while allowing independent operations.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent assigns unique identifiers and timestamps to data nodes before they are created or modified. This preliminary action enables the server to predict and resolve potential conflicts before they manifest as inconsistencies, by using the pre-assigned identifiers to track node lifecycles across devices and determine the correct merged state.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If complex merging logic is implemented to resolve inconsistencies, then data consistency is improved, but system complexity increases

Engineering Contradiction:
Improvedata consistencyVSAvoidmerging system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent offloads the complex merging logic to the server, which acts as a mediator between devices. Devices only need to send and receive data models, while the server performs the sophisticated CRDT-based merging operations. This distributes complexity away from devices, maintaining their simplicity while achieving high consistency through the server's intelligent merging algorithms.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS12468682B2Conflict-free graphs of distributed data structures
Publication Date: 2025.11.11 APPLE INC
  • US12468682B2 patent drawing
  • US12468682B2 patent drawing
  • US12468682B2 patent drawing

AI summary

A device implementing a system for obtaining a consistent state of data based on data updates made on different devices includes a processor configured to generate, for a first data update, a first data model including first data nodes, each including a first identifier and a first data value corresponding to one of first data objects. The processor is configured to receive from a second device, for a second data update to the data, the second update being independent of the first update, a second data model including second data nodes, each including a second identifier and a second data value corresponding to one of second data objects. A consistent data model is obtained by merging the first and second data values with the same identifier, and then merging the first and second data models, and generating a final update of the data based on the consistent data model.