Chord protocol and algorithm in distributed programming language
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.