CRDT协议的TLA+描述与验证
作者:
作者单位:

作者简介:

纪业(1995-),男,江苏淮安人,硕士生,主要研究领域为分布数据一致性,形式化方法;魏恒峰(1986-),男,博士,CCF专业会员,主要研究领域为分布数据一致性,形式化方法;黄宇(1982-),男,博士,教授,博士生导师,CCF专业会员,主要研究领域为分布式算法,分布式系统,网络化软件系统;吕建(1960-),男,博士,教授,博士生导师,CCF会士,主要研究领域为软件方法学.

通讯作者:

魏恒峰,E-mail:hfwei@nju.edu.cn

中图分类号:

基金项目:

国家重点研发计划(2017YFB1001801);国家自然科学基金(61702253,61772258)


Specifying and Verifying CRDT Protocols Using TLA+
Author:
Affiliation:

Fund Project:

National Key Research and Development Program of China (2017YFB1001801); National Natural Science Foundation of China (61702253, 61772258)

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    无冲突复制数据类型(conflict-free replicated data types,简称CRDT)是一种封装了冲突消解策略的分布式复制数据类型,它能够保证分布式系统中副本节点间的强最终一致性,即执行了相同更新操作的副本节点具有相同的状态.CRDT协议设计精巧,不易保证其正确性.旨在采用模型检验技术验证一系列CRDT协议的正确性.具体而言,构建了一个可复用的CRDT协议描述与验证框架,包括网络通信层、协议接口层、具体协议层与规约层.网络通信层描述副本节点之间的通信模型,实现了多种类型的通信网络.协议接口层为已知的CRDT协议(分为基于操作的协议与基于状态的协议)提供了统一的接口.在具体协议层,用户可以根据协议的需求选用合适的底层通信网络.规约层则描述了所有CRDT协议都需要满足的强最终一致性与最终可见性(所有的更新操作最终都会被所有的副本节点接收并处理).使用TLA+形式化规约语言实现了该框架,然后以Add-Wins Set复制数据类型为例,展示了如何使用框架描述具体协议,并使用TLC模型检验工具来验证协议的正确性.

    Abstract:

    Conflict-free replicated data types (CRDT) are replicated data types that encapsulate the mechanisms for resolving concurrent conflicts. They guarantee strong eventual consistency among replicas in distributed systems, which requires replicas that have executed the same set of updates be in the same state. However, CRDT protocols are subtle and it is difficult to ensure their correctness. This study leverages model checking to verify the correctness of CRDT protocols. Specifically, a reusable framework is proposed for modelling and verifying CRDT protocols. The framework consists of four layers, i.e., the communication layer, the interface layer, the protocol layer, and the specification layer. The communication layer models the communication among replicas and implements a variety of communication networks. The interface layer provides a uniform interface for existing CRDT protocols, including both the operation-based protocols and the state-based ones. In the protocol layer, users can choose the appropriate underlying communication network required by a specific protocol. The specification layer specifies strong eventual consistency and the eventual visibility property (i.e., all updates are eventually delivered by all replicas) that every CRDT protocol should satisfy. This framework is implemented using a formal specification language called TLA+. It is also demonstrated that how to model CRDT protocols in this framework and how to verify their correctness via the model checking tool called TLC, taking Add-Wins Set as an example.

    参考文献
    相似文献
    引证文献
引用本文

纪业,魏恒峰,黄宇,吕建. CRDT协议的TLA+描述与验证.软件学报,2020,31(5):1332-1352

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2019-09-03
  • 最后修改日期:2019-10-24
  • 录用日期:
  • 在线发布日期: 2020-04-09
  • 出版日期: 2020-05-06
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号