计算机应用 ›› 2013, Vol. 33 ›› Issue (07): 1885-1889.DOI: 10.11772/j.issn.1001-9081.2013.07.1885

• 先进计算 • 上一篇    下一篇

基于分布式编程语言的Chord协议和算法

彭成章,蒋泽军,蔡小斌,张志珂   

  1. 西北工业大学 计算机学院,西安 710129
  • 收稿日期:2013-01-29 修回日期:2013-03-13 出版日期:2013-07-01 发布日期:2013-07-06
  • 通讯作者: 蒋泽军
  • 作者简介:彭成章(1977-),男,湖南岳阳人,博士研究生,CCF会员,主要研究方向:云计算、分布式数据流处理;蒋泽军(1964-),男,陕西西安人,教授,主要研究方向:云计算、云存储、网络与信息安全;蔡小斌(1957-),男,江西黎川人,教授,博士生导师,主要研究方向:虚拟实验;张志珂(1984-),男,河南巩义人,博士研究生,主要研究方向:重复数据删除。
  • 基金资助:

    航空科学基金资助项目(2010ZD53042,2012ZC53040);航空科学基金资助项目(2010ZD53042,2012ZC53040);陕西省自然科学基金资助项目(2010JM8023)

Chord protocol and algorithm in distributed programming language

PENG Chengzhang,JIANG Zejun,CAI Xiaobin,ZHANG Zhike   

  1. School of Computer Science, Northwestern Polytechnical University, Xi'an Shaanxi 710129, China
  • Received:2013-01-29 Revised:2013-03-13 Online:2013-07-06 Published:2013-07-01
  • Contact: JIANG Zejun
  • Supported by:

    the Aeronautical Science Foundation of China under Grant;the Aeronautical Science Foundation of China under Grant

摘要: P2P分布式哈希表(DHT)协议本身简洁并且易于理解,但是命令式语言与分布式架构的不匹配使得实现和部署一个拥有全部功能的类似Chord的组件相当困难和复杂。针对这些问题,提出一种基于Bloom系统来设计P2P分布式哈希表协议的方法。首先,阐述了Bloom系统的分布式逻辑编程语言要素;其次,设计了一个最小分布式系统;再次,通过定义永久、暂时、异步通信和周期集合,设计了指表维护算法、后继列表算法以及维持稳定算法等,实现一个Chord原型系统。实验结果证明,原型系统能完成Chord所有功能,并且与传统语言相比,代码量减少60%。分析表明最终的算法代码和分布式哈希表协议规范高度一致,不仅增强了代码的可读性和重用性,而且加深了对协议本身及其应用的理解。

关键词: P2P, 分布式哈希表, 逻辑编程, Chord, Bloom

Abstract: The Peer-to-Peer (P2P) Distributed Hash Table (DHT) protocol is concise, and can be understood easily, but implementing and deploying a component like Chord with all functions in practice is very difficult and complicated because of the mismatch between popular imperative language and distributed architecture. To resolve these problems, a P2P DHT protocol based on Bloom system was proposed. Firstly, the distributed logic programming language's key elements of Bloom system were expounded. Secondly, a minimal distributed system was designed. Thirdly, a Chord prototype system was implemented through defining persistent, transient, asynchronous communicating and periodic collections and designing several algorithms for finger table maintaining, successor listing, stabilization preseving and so on. The experimental results show that the prototype system can finish full functions of Chord, and compared to traditional languages, 60% of the code lines can be saved. The analysis indicates such a high degree of uniformity between final code of the algorithm and the DHT protocol specification makes it more readable and reusable, and helpful for further understanding the specific protocol and relative applications.

Key words: Peer-to-Peer (P2P), Distributed Hash Table (DHT), logic programming, Chord, Bloom

中图分类号: