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}.


翻译:2P-Set无冲突复制数据类型(CRDT)为每个可能的元素支持两个阶段:第一阶段可将元素添加到集合中,后续添加操作将被忽略;第二阶段可移除元素,此后无论后续进行多少次添加或移除操作,该元素都将永久保持移除状态。我们将2P-Set泛化为支持同一元素的无限交替添加与移除序列。当不同副本上存在并发的添加和移除操作时,所有副本最终将收敛到遵循因果历史的最长交替添加与移除序列。这一基于最长因果对立操作序列的收敛思想已在撤销-重做框架中被提出,但该设计既未被命名也未被完整开发。本文直接给出完整设计,仅需使用基于状态的CRDT基本公式即可实现。我们还通过简单推理展示了2P-Set的基于集合的定义与$\infty$P-Set的基于计数器的定义之间的联系。随后给出了收敛性的详细证明。构建$\infty$P-Set所依赖的底层数据结构——仅增长计数器的仅增长字典,可用于构建其他基于状态的CRDT。此外,本文可作为设计基于状态的CRDT的教学范例,并有助于提升基于"最长序列获胜"策略的CRDT的知名度。

0
下载
关闭预览

相关内容

【2023新书】使用Python进行统计和数据可视化,554页pdf
专知会员服务
130+阅读 · 2023年1月29日
专知会员服务
46+阅读 · 2020年10月31日
5个步骤,轻松设计出用户操作日志
人人都是产品经理
1+阅读 · 2022年10月15日
使用 GraphQL 和 Ballerina 操作多个数据源
InfoQ
0+阅读 · 2022年7月21日
图机器学习 2.2-2.4 Properties of Networks, Random Graph
图与推荐
10+阅读 · 2020年3月28日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
逆强化学习-学习人先验的动机
CreateAMind
16+阅读 · 2019年1月18日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
【推荐】RNN/LSTM时序预测
机器学习研究会
25+阅读 · 2017年9月8日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
3+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
1+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
1+阅读 · 2011年12月31日
Arxiv
0+阅读 · 2023年5月25日
Arxiv
0+阅读 · 2023年5月24日
Arxiv
0+阅读 · 2023年5月23日
Arxiv
0+阅读 · 2023年5月23日
VIP会员
最新内容
《通过小型无人机系统将情报能力“作战化”》
专知会员服务
3+阅读 · 今天7:28
消耗优势:美军的“精确规模化”概念
专知会员服务
8+阅读 · 6月15日
《离线语言支持系统:面向空战战术决策》
专知会员服务
8+阅读 · 6月15日
相关资讯
5个步骤,轻松设计出用户操作日志
人人都是产品经理
1+阅读 · 2022年10月15日
使用 GraphQL 和 Ballerina 操作多个数据源
InfoQ
0+阅读 · 2022年7月21日
图机器学习 2.2-2.4 Properties of Networks, Random Graph
图与推荐
10+阅读 · 2020年3月28日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
逆强化学习-学习人先验的动机
CreateAMind
16+阅读 · 2019年1月18日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
【推荐】RNN/LSTM时序预测
机器学习研究会
25+阅读 · 2017年9月8日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
3+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
1+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
1+阅读 · 2011年12月31日
Top
微信扫码咨询专知VIP会员