Conflict-Free Replicated Data Types (CRDTs) for JSON allow users to concurrently update a JSON document and automatically merge the updates into a consistent state. Moving a subtree in a map or reordering elements in a list within a JSON CRDT is challenging: naive merge algorithms may introduce unexpected results such as duplicates or cycles. In this paper, we introduce an algorithm for move operations in a JSON CRDT that handles the interaction with concurrent non-move operations, and uses novel optimisations to improve performance. We plan to integrate this algorithm into the Automerge CRDT library.
翻译:冲突无关复制数据类型(CRDT)允许用户并发更新JSON文档,并自动将更新合并为一致状态。在JSON CRDT中移动映射中的子树或重排序列表元素颇具挑战性:朴素合并算法可能导致意外结果,例如重复或循环。本文提出了一种适用于JSON CRDT的移动操作算法,该算法能处理与并发非移动操作的交互,并采用新颖的优化技术提升性能。我们计划将该算法集成到Automerge CRDT库中。