Moderately Complex Paxos Made Simple: High-Level Executable Specification of Distributed Algorithms

Yanhong A. Liu, Saksham Chand, S. Stoller
{"title":"Moderately Complex Paxos Made Simple: High-Level Executable Specification of Distributed Algorithms","authors":"Yanhong A. Liu, Saksham Chand, S. Stoller","doi":"10.1145/3354166.3354180","DOIUrl":null,"url":null,"abstract":"This paper describes the application of a high-level language and method in developing simpler specifications of more complex variants of the Paxos algorithm for distributed consensus. The specifications are for Multi-Paxos with preemption, replicated state machine, and reconfiguration and optimized with state reduction and failure detection. The language is DistAlgo. The key is to express complex control flows and synchronization conditions precisely at a high level, using nondeterministic waits and message-history queries. We obtain complete executable specifications that are almost completely declarative--updating only a number for the protocol round besides the sets of messages sent and received. We show the following results: (1) English and pseudocode descriptions of distributed algorithms can be captured completely and precisely at a high level, without adding, removing, or reformulating algorithm details to fit lower-level, more abstract, or less direct languages. (2) We created higher-level control flows and synchronization conditions than all previous specifications, and obtained specifications that are much simpler and smaller, even matching or smaller than abstract specifications that omit many algorithm details. (3) The simpler specifications led us to easily discover useless replies, unnecessary delays, and liveness violations (if messages can be lost) in previous published specifications, by just following the simplified algorithm flows. (4) The resulting specifications can be executed directly, and we can express optimizations cleanly, yielding drastic performance improvement over naive execution and facilitating a general method for merging processes. (5) We systematically translated the resulting specifications into TLA+ and developed machine-checked safety proofs, which also allowed us to detect and fix a subtle safety violation in an earlier unpublished specification. Additionally, we show the basic concepts in Paxos that are fundamental in many distributed algorithms and show that they are captured concisely in our specifications.","PeriodicalId":182058,"journal":{"name":"Proceedings of the 21st International Symposium on Principles and Practice of Declarative Programming","volume":"19 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-03-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"7","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 21st International Symposium on Principles and Practice of Declarative Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3354166.3354180","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 7

Abstract

This paper describes the application of a high-level language and method in developing simpler specifications of more complex variants of the Paxos algorithm for distributed consensus. The specifications are for Multi-Paxos with preemption, replicated state machine, and reconfiguration and optimized with state reduction and failure detection. The language is DistAlgo. The key is to express complex control flows and synchronization conditions precisely at a high level, using nondeterministic waits and message-history queries. We obtain complete executable specifications that are almost completely declarative--updating only a number for the protocol round besides the sets of messages sent and received. We show the following results: (1) English and pseudocode descriptions of distributed algorithms can be captured completely and precisely at a high level, without adding, removing, or reformulating algorithm details to fit lower-level, more abstract, or less direct languages. (2) We created higher-level control flows and synchronization conditions than all previous specifications, and obtained specifications that are much simpler and smaller, even matching or smaller than abstract specifications that omit many algorithm details. (3) The simpler specifications led us to easily discover useless replies, unnecessary delays, and liveness violations (if messages can be lost) in previous published specifications, by just following the simplified algorithm flows. (4) The resulting specifications can be executed directly, and we can express optimizations cleanly, yielding drastic performance improvement over naive execution and facilitating a general method for merging processes. (5) We systematically translated the resulting specifications into TLA+ and developed machine-checked safety proofs, which also allowed us to detect and fix a subtle safety violation in an earlier unpublished specification. Additionally, we show the basic concepts in Paxos that are fundamental in many distributed algorithms and show that they are captured concisely in our specifications.
中等复杂的Paxos变得简单:分布式算法的高级可执行规范
本文描述了一种高级语言和方法在开发用于分布式共识的Paxos算法的更复杂变体的更简单规范中的应用。这些规范适用于具有抢占、复制状态机、重新配置和通过状态减少和故障检测进行优化的Multi-Paxos。语言是DistAlgo。关键是使用不确定性等待和消息历史查询,在高层精确地表达复杂的控制流和同步条件。我们获得了完整的可执行规范,这些规范几乎完全是声明性的——除了发送和接收的消息集之外,只更新了协议轮的一个数字。我们展示了以下结果:(1)分布式算法的英文和伪代码描述可以在高层次上完全准确地捕获,而无需添加,删除或重新制定算法细节以适应较低级别,更抽象或更不直接的语言。(2)我们创建了比以往所有规范更高层次的控制流和同步条件,并获得了更简单、更小的规范,甚至与忽略了许多算法细节的抽象规范相匹配或更小。(3)简单的规范使我们通过遵循简化的算法流程,很容易发现以前发布的规范中无用的回复、不必要的延迟和活动违规(如果消息可能丢失)。(4)产生的规范可以直接执行,我们可以清晰地表达优化,相对于单纯的执行产生巨大的性能改进,并促进合并过程的通用方法。(5)我们系统地将结果规范翻译成TLA+,并开发了机器检查的安全证明,这也使我们能够在早期未发布的规范中检测和修复细微的安全违规。此外,我们还展示了Paxos中的基本概念,这些概念是许多分布式算法的基础,并在我们的规范中简洁地描述了它们。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信