Academic Exchange | Trias and Peking University Experts Discuss Peer-To-Peer Network Communication Protocol
Last week, Trias jointly held a Salon with the School of Software and Microelectronics, PKU. The salon activity mainly focused on the P2P (Point-To-Point) agreement in-depth exchanges. Trias core developer Wang Jiashuai and Peking University professor Shen Qingni, professor Yang Yahui and professor Fang Yuejian attended the salon as well as a number of doctoral and master’s degree students from the School of Microelectronics.
At the meeting, Mr. Wang Jiashuai firstly gave a brief introduction to Trias’ P2P small-world network communication mode and Trias Gossip protocol optimization.
In the distributed system, the most difficult problem needs to solve is data synchronization among multiple nodes. Mr. Wang gave a vivid explanation to the existing three basic distributed communication protocols: Totem protocol, Paxos protocol and Gossip protocol.
Wang Jiashuai especially explained the Gossip protocol. A gossip protocol is a procedure or process of computer–computer communication that is based on the way social networks disseminate information or how epidemics spread. It is a communication protocol. Modern distributed systems often use gossip protocols to solve problems that might be difficult to solve in other ways, either because the underlying network has an inconvenient structure, is extremely large, or because gossip solutions are the most efficient ones available.
Although it is not guaranteed that all nodes will receive messages at a certain moment, in theory all nodes will eventually receive messages, so the Gossip protocol is a final consistency protocol.
The Gossip protocol can be seen as gossip news on social networks. Initially, although each person has a limited number of friends, people still know the gossip news is spreading. But the gossip news is able to ferment quickly in social networks. Or the Gossip protocol can be compared to the spread of epidemic diseases.
Besides, the concept of gossip communication can be illustrated by the analogy of office workers spreading rumors. Let’s say each hour the office workers congregate around the water cooler. Each employee pairs off with another, chosen at random, and shares the latest gossip.
The power of gossip lies in the robust spread of information. Even if Dave had trouble understanding Bob, he will probably run into someone else soon and can learn the news that way.
Wang Jiashuai mentioned that as a final consistency protocol, Gossip is usually compared with Totem protocol, Paxos protocol.
Among them, the Totem protocol forms a single ring structure between the nodes. It can be used token to achieve the transmission of messages, only the nodes get token can send messages ensure in an orderly way.
Paxos is a family of protocols for solving consensus in a network of unreliable processors (that is, processors that may fail). Consensus is the process of agreeing on one result among a group of participants. This problem becomes difficult when participants or their communication medium may experience failures.
Generally speaking, Paxos protocol is in the first phase by a node to ask whether other nodes can submit the message, and if more than half of the nodes respond, it can commit the message, otherwise failed. In the second stage, the number of news more than half responses, which can be written in and some preconditions need to be met.
Compared with strong consistency protocols such as Totem protocol and Paxos protocol, Gossip protocol relaxes the requirement of consistency, reduces the difficulty of system implementation, and emphasizes the realization of final consistency under certain constraints, that is, it is always at a certain time. The system is in a consistent state.
When talking about the principle of Gossip, a group of teachers and students from Peking University discussed some details of the issue, the atmosphere peaked warmly. It has been suggested that how can efficiency be balanced with data reliability? Does Gossip converge during broadcast? When does each node stop? In answering this question, a classmate cited Bitcoin as an example, said that when a node receives an old message, it no longer sends it. Thus, avoiding repetition and promoting efficiency.
After the sharing, the students from Peking University also shared their relevant research directions and results and the relevant content of P2P network. In particular the technical characteristics and network classification of P2P are discussed in detail. At the same time, the P2P network structure and technical characteristics of Bitcoin and Ethereum are analyzed. In addition, it is also deeply analyzed its communication protocol algorithms.
Wang Jiashuai also mentioned that some of the core highlights in Bitcoin and Ethereum are worth learning from, and considering the differences between different algorithms to adapt to different application scenarios.
Trias holds weekly salon events with Peking University, where you can take questions about blockchain technology or Trias projects can drop into the tech community at any time. Perhaps the theme of the next event salon will be your choice.