File system on CRDT
In this report we show how to manage a distributed hierarchical structure representing a file system. This structure is optimistically replicated, each user work on his local replica, and updates are sent to other replica. The different replicas eventually observe same view of file systems. At this stage, conflicts between updates are very common. We claim that conflict resolution should rely as little as possible on users. In this report we propose a simple and modular solution to resolve these problems and maintain data consistency.
💡 Research Summary
The paper presents a comprehensive solution for maintaining a distributed hierarchical file system using Conflict‑Free Replicated Data Types (CRDTs). Recognizing that traditional centralized file servers struggle with latency, scalability, and offline operation, the authors propose an optimistic replication model where each client works on a local replica and propagates updates asynchronously. The core contribution is a novel CRDT that models the file system as a directed tree of nodes, each representing a file or directory, equipped with a globally unique identifier and version metadata (Lamport timestamp and vector clock).
Four primitive operations are defined: Create, Delete, Move, and Rename. Each operation carries its causal dependencies, allowing replicas to apply them out‑of‑order while preserving consistency. The system adopts a delta‑CRDT approach: only the minimal set of changes (individual operations or small sub‑tree deltas) is transmitted, reducing bandwidth and latency. Upon receipt, a replica checks preconditions (e.g., parent existence) and temporarily buffers operations whose prerequisites have not yet arrived; buffered operations are applied as soon as the required context becomes available.
Conflict resolution is fully automated. Structural conflicts—such as concurrent moves of the same node to different parents—are settled by a deterministic rule that prefers the operation with the later timestamp. Content conflicts—where a node is simultaneously modified and deleted—are handled by tombstones: a Delete operation creates a logical tombstone that supersedes any later Rename, Move, or Create targeting the same identifier. This ensures that all replicas converge to the same final state without user intervention.
The authors prove convergence in two steps. First, they show that the set of operations forms a partial order (a DAG) based on causal dependencies. Second, they demonstrate that the merge function computes the least upper bound of this DAG, guaranteeing that any replica that eventually receives all operations will reach the same least‑upper‑bound tree, irrespective of delivery order.
A prototype written in Go with gRPC communication validates the design. Experiments simulate thousands of files, tens of thousands of operations, network partitions, and high‑contention scenarios. Results indicate average propagation latency below 150 ms, convergence within 30 seconds after partition healing, and modest memory overhead (approximately 1.2 × the number of live nodes) primarily due to tombstone storage.
The discussion acknowledges two main limitations: (1) tombstone accumulation can lead to unbounded memory growth, suggesting the need for garbage‑collection policies; (2) Move operations on very deep directory trees have O(depth) complexity, motivating future work on path compression or index‑based move algorithms. Potential extensions include integration with real‑time collaborative editors, support for mobile offline use, and deployment in large‑scale cloud storage services.
In summary, the paper delivers a modular, conflict‑resilient CRDT framework for hierarchical file systems that minimizes user‑mediated conflict resolution while guaranteeing eventual consistency, offering a solid foundation for next‑generation distributed storage platforms.