arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2304.01929cs.DC
收藏

基于状态的 ∞P-Set 无冲突复制数据类型

State-Based $\infty$P-Set Conflict-Free Replicated Data Type

Erick Lavoie

AI总结:

本文将 2P-Set CRDT 推广为支持同一元素无限交替添加与移除的 ∞P-Set,给出基于状态的完整设计、与计数器定义的联系及收敛性证明,并指出其底层结构可复用于其他 CRDT。

摘要:

***** 本设计是因果长度集(Causal Length Set)的重复版本(见注释中的说明)。尽管如此,我们仍在此保留原始论文,因为另一篇投稿引用了其中的证明。*****\n2P-Set 无冲突复制数据类型(CRDT)为每个可能的元素支持两个阶段:在第一阶段,元素可以被添加到集合中,后续的添加操作会被忽略;在第二阶段,元素可以被移除,此后无论后续的添加和移除操作如何,它将永远保持被移除状态。我们将 2P-Set 推广为支持同一元素的添加与移除操作无限交替序列。在不同副本上存在并发的添加和移除操作时,所有副本最终将收敛到遵循因果历史的最长交替添加与移除序列。\n关于收敛到相反操作的最长因果序列这一思想,此前已在撤销-重做框架的语境中被提出,但该设计既未被命名,也未得到充分发展。在本文中,我们直接给出完整设计,仅使用基于状态的 CRDT 的基本表述。我们还通过简单的推理展示了基于集合的 2P-Set 定义与基于计数器的 ∞P-Set 定义之间的联系。随后我们给出了收敛性的详细证明。构建 ∞P-Set 所基于的底层“仅增长计数器构成的仅增长字典”可用于构建其他基于状态的 CRDT。此外,本文作为设计基于状态的 CRDT 的教学示例应当是有用的,并可能有助于提升基于“最长序列获胜”原则的 CRDT 的知名度。

英文摘要:

***** This design is a duplicate of a Causal Length Set (see notes in the comments). We leave nonetheless the original paper here because the proofs are referred to in another submission.***** The 2P-Set Conflict-Free Replicated Data Type (CRDT) supports two phases for each possible element: in the first phase an element can be added to the set and the subsequent additions are ignored; in the second phase an element can be removed after which it will stay removed forever regardless of subsequent additions and removals. We generalize the 2P-Set to support an infinite sequence of alternating additions and removals of the same element. In the presence of concurrent additions and removals on different replicas, all replicas will eventually converge to the longest sequence of alternating additions and removals that follows causal history. The idea of converging on the longest-causal sequence of opposite operations had already been suggested in the context of an undo-redo framework but the design was neither given a name nor fully developed. In this paper, we present the full design directly, using nothing more than the basic formulation of state-based CRDTs. We also show the connection between the set-based definition of 2P-Set and the counter-based definition of the $\infty$P-Set with simple reasoning. We then give detailed proofs of convergence. The underlying \textit{grow-only dictionary of grow-only counters} on which the $\infty$P-Set is built may be used to build other state-based CRDTs. In addition, this paper should be useful as a pedagogical example for designing state-based CRDTs, and might help raise the profile of CRDTs based on \textit{longest sequence wins}.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑