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

分布式系统中的强最终一致性

Verifying Strong Eventual Consistency in Distributed Systems

Victor B. F. Gomes, Martin Kleppmann, Dominic P. Mulligan, Alastair R. Beresford

摘要:

数据复制用于分布式系统中,以维护网络中多台计算机之间的共享数据的最新副本。然而,尽管经过几十年的研究,在复制系统中实现一致性的算法仍然知之甚少。事实上,许多已发表的算法后来都被证明是不正确的,甚至有些算法还附带了所谓的机械化正确性证明。在这项工作中,我们专注于无重复数据类型(CRDTs),一类算法,提供了强大的最终一致性保证复制数据的正确性。我们在Isabelle/HOL交互式证明助手中开发了一个模块化的可重用框架,用于验证CRDT算法的正确性。我们通过在我们的形式化中包括网络模型,并证明我们的定理在所有可能的网络行为中成立,避免了在这一领域困扰以前的机械化证明的正确性问题。我们的公理化网络模型是一个标准的抽象,准确地反映了现实世界的计算机网络的行为。此外,我们确定了一个抽象的收敛定理,顺序关系的属性,它提供了一个正式的定义强最终一致性。然后,我们得到了第一个机器检查的正确性定理三个具体的CRDTs:复制的可增长数组,观察删除集,和一个增量递减计数器。我们发现,我们的框架是高度可重用的,在几个小时内开发后两个CRDT的正确性证明,并与相对较少的CRDT特定的代码。

英文摘要:

Data replication is used in distributed systems to maintain up-to-date copies of shared data across multiple computers in a network. However, despite decades of research, algorithms for achieving consistency in replicated systems are still poorly understood. Indeed, many published algorithms have later been shown to be incorrect, even some that were accompanied by supposed mechanised proofs of correctness. In this work, we focus on the correctness of Conflict-free Replicated Data Types (CRDTs), a class of algorithm that provides strong eventual consistency guarantees for replicated data. We develop a modular and reusable framework in the Isabelle/HOL interactive proof assistant for verifying the correctness of CRDT algorithms. We avoid correctness issues that have dogged previous mechanised proofs in this area by including a network model in our formalisation, and proving that our theorems hold in all possible network behaviours. Our axiomatic network model is a standard abstraction that accurately reflects the behaviour of real-world computer networks. Moreover, we identify an abstract convergence theorem, a property of order relations, which provides a formal definition of strong eventual consistency. We then obtain the first machine-checked correctness theorems for three concrete CRDTs: the Replicated Growable Array, the Observed-Remove Set, and an Increment-Decrement Counter. We find that our framework is highly reusable, developing proofs of correctness for the latter two CRDTs in a few hours and with relatively little CRDT-specific code.

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

↑