Message propagation is a primary means to locate resources in current unstructured peer-to-peer (P2P) systems and how to reduce effectively the redundant messages of propagation while keeping its high network coverage is what many researchers go in for in this field. In this paper, we propose the algorithm of LMPR, a scheme of improved MPR for message propagation in distributed unstructured P2P system. Based on analyzing the process and message redundancy of MPR, this paper proposes to add to such scheme a mechanism of specified relay-list to reduce further the number of its retransmitting of message. By attaching to each relay-peer a relay-list with peers it will relay message to, the scheme can assure that in the view of each decision-peer a broadcast message can be dispatched and only be dispatched once to every neighbor peer within 2 hops of it. Simulation results show that the scheme of LMPR has better performance than that of MPR in message redundancy, network overhead, and fluctuation brought to the system.
Peer-to-peer (P2P) systems become immensely popular in recent years and they are used in a variety of contexts, from file sharing applications, distributed storage, to content streaming, and so forth [
Many protocols have been proposed for message propagation and flooding-based broadcast is the basic idea of them [
In broadcasting, message needs a mechanism to reach the far away nodes. And the concept of intermediate peers which serve as relays to pass the messages between the source and the destination is one of the solutions. By reducing the number of redundant intermediate peers, the scheme of multipoint relaying (MPR) [
The remaining of this paper is organized as follows. Section
Pure flooding is the simplest broadcast scheme in distributed P2P overlay networks. It starts with the source peer S sending a message package to all its neighbor peers. On receipt of the message first time, a neighbor peer forwards the message to each of its own neighbor peers except for the sender. Thus, a message floods in the network. When a peer receives a repeat message, it drops it and does not retransmit it. The pure flooding scheme is easy to implement and has a high probability to disseminate a message to all other peers in the network. However it implies a huge network overhead due to its characteristic of message explosion.
Multipoint relaying (MPR) scheme can be seen as developed to reduce the number of duplicate retransmissions of pure flooding. In this protocol, the number of message re-transmitters is restricted to a small subset, not all the sender’s neighbor peers that receive the message first time, like pure flooding scheme. This subset of retransmitters is called multipoint relays of a given network in scheme of MPR. These multipoint relays can cover the same network region as all the re-transmitters of flooding algorithm. Each node decides the set of multipoint relays in the view of its own neighbor peers within 2 hops, completely independent of other nodes’ selection of their MPRs. To select the multipoint relays for a node Start with an empty multipoint relay set First select every 1-hop neighbor peer While there still exists some peer in
To analyze intuitively the message redundancy of MPR in broadcasting, we consider a scenario of message propagation in the miniature of a typical unstructured P2P network. With this network model the message redundancy of pure flooding and MPR is analyzed. And the network topology is given in Figure
Network topology.
In order to focus on the problem of message redundancy in MPR when broadcasting, in this paper we assume a simplified network model where there is no message failure, where messages are delivered instantly and where each peer has a unique identity assigned by the system. And we also assume that the less hops a peer away from S the earlier it receives the broadcasting message. For those peers who both have the same hops away from S and receive the broadcasting message transmitted by the same source or relay-peer, the smaller the serial number of a peer, the earlier it receives message from the transmitter. For example, the source peer S transmits the message to its neighbors in order of i1, i2, and i3, and the peer j1 transmits its relay message in order of k1, k2, and k3. For convenience of presenting, we divide peers into two groups: the peers who relay the broadcasting message to their neighbors after receiving it are called relay-peers, and the others are called reception-peers who do not forward the broadcasting message further after receiving it.
In the scheme of pure flooding, all the peers except for the source are relay-peers, and every relay-peer always transmits the message to all its neighbors except for the senders. Therefore, each link in network corresponds to a message transmission. As for the network scenario with topology given in Figure
Effect of message propagation.
The main objective of MPR scheme is to obtain a minimized set of relay-peers to cover all peers in network. According to the MPR scheme, in the network scenario given above, firstly the source peer S decides to choose i1 and i2 as relay-peers, then peer i1 chooses j1, j2, j6 as relay-peers, and peer i2 chooses j4 as relay-peer to cover all the 2-hop neighbors in their view. As a result, within 3 hops from S the message reaches 21 peers: 6 relay-peers (i1, i2, j1, j2, j6, and j4) and 15 reception-peers (i3, j3, j5, and k1~k12). And the major improvement is that the three peers (i3, j3, and j5) simply act as reception-peers in MPR while they are relay-peers in pure flooding. The propagation effect of MPR is shown in Figure
Effect of message propagation.
Effect of message propagation.
In MPR scheme, although the number of relay-peers is minimized on the base of pure flooding, each of the selected relay-peers still transmits a message to all its 1-hop neighbors except for the sender. Thus if a reception-peer has direct links to many relay-peers at one time, it will surely receive separately a message from each of these neighboring relay-peers. Similarly, if one relay-peer is neighboring to another relay-peer there always exits a message from the one who is the earlier receiver to the other. However, for each peer one message is theoretically enough, no matter it is a relay-peer or not, all the other messages it received are redundant. As for the network scenario we discussed, there are 21 peers within 3 hops from S, so 21 messages are enough for an optimal scheme to broadcast the message to every peer. Nevertheless, the MPR scheme expends 27 messages to realize the broadcasting; although this number is 7 less than that of pure flooding, there is still 6 redundant messages to optimize compared with the optimal scheme. Therefore, if the relay-peers selected by MPR scheme have many common neighbors or have many links between themselves, the number of redundant messages is surely nontrivial. In fact, in the current P2P networks which are generally of power-law distribution characteristics, this situation is always there [
As can be seen from the above analysis of message redundancy that although the MPR technique reduces greatly the number of retransmissions of pure flooding, the scheme still brings heavy extra message load to the P2P applications which are generally built on the complex network with characters of power-law distribution. The reason is that relay-peers in MPR scheme do not share the information of their relay targets, which leads to the fact that after one relay-peer has already sent a message to a neighboring peer there are still many other relay-peers transmitting message to the same target peer. In other words, many relay-peers transmit repeatedly the message to common target peers because of their blindness of one another’s relaying information. Aiming at improving this situation, this paper proposes the scheme of LMPR which is to add to the MPR scheme a technique of specified relay-list. By attaching to each relay-peer a relay-list with peers it will relay message to, a decision-peer assigns for each of its 2-hop neighbors a responsible relay-peer, so as to assure that multiple relay-peers will not transmit message to one common peer in the 2-hop view of the decision-peer.
The scheme of LMPR works in a distributed manner and starts from the source peer of message propagation. According to the role in relaying process we divided the working states of a peer into two kinds: decision-peer and normal-peer. When a source peer begins to broadcast message to its 1-hop neighbors or when a peer receives the broadcasting message, it turns into the state of a decision-peer who decides how to forward the message to peers within 2 hops of its view. A decision-peer decides independently the set of relay-peers in its own view and assigns for each of these relay-peers a specified list containing the subset of all 2-hop neighbors of the decision-peer. (Here, the specified list is used to tell the corresponding relay-peer which 2-hop neighbors of the decision-peer it should relay message to.) And then the decision-peer sends to each neighbor a message accompanied by the specified list. After transmitting the message accompanied by relay-list to every neighbor, the peer turns into the state of normal-peer in which the peer updates its neighboring information, manages the information used in LMPR, or does other things which are required in P2P application but beyond the discussion of basic idea of LMPR. Therefore the basic idea of LMPR is generally implemented by the actions of decision-peer, which includes mainly three parts: multipoint relaying with relay-list, generating of
First, Similar to MPR, we assume that each peer in the system knows all its neighbors within 2 hops and their neighboring relations between each other. And a peer can obtain this information by exchanging the 1-hop neighboring information with all its 1-hop neighbors. Based on this information and the relay-list named list0 which is received from its upstream decision-peer, each decision-peer
Since a relay-peer only transmits the message to the part of its 1-hop neighbors specified by list0 when it turns into a decision-peer, therefore only those 2-hop neighbors covered by the 1-hop neighbors given in list0 are needed to be broadcast to. And the remaining 2-hop neighbors of it can be broadcasted message to by the relay-peers not included in list0 and such transmitting assignment is considered by the upstream decision-peer according to the principle of LMPR. Otherwise, this redundancy problem will arise when the message is relayed to 3-hop neighbors of the decision-peer. Thus, to extend the optimizing mechanism of relay-list to the peers farther than 2 hops, the set of
To avoid that several relay-peers transmit message to a common neighbor in its view, a decision-peer assigns for each of its relay-peers a specified list containing the IDs of those 2-hop neighbors it will relay message to. And the mechanism of relay-list makes ensure that each 2-hop peer must appear and only appears once in one of the lists. To generate such relay-lists, decision-peer
The working procedures of a decision-peer
If it is a source peer,
For each
For each item of
To better illustrate the scheme of LMPR and show its improvement over MPR, we still take the network scenario given in Section
As for the network shown in Figure
Effect of message propagation.
From the process of message propagation presented above, we can see obviously that a relay-peer does not forward a message to all its neighbors as it does in MPR. However it only transmits the message to those assigned by the specified relay-list, so as to reduce the number of messages while the message coverage keeps unchangeable. Although there is still a redundant message from peer j4 to k5 shown as a dash line in Figure
Effect of message propagation.
The performance of MPR scheme and its advantage over the pure flooding has been studied by [
We divide the simulations into two subsections: the performance in a classic stable P2P network and the stability of performance under varying network size and packet loss probability. The first subsection is to evaluate the main performance of the two schemes of LMPR and MPR in a classic stable P2P network. And the second subsection shows their performances under P2P networks with different sizes and packet loss probabilities, which is to testify the stability and representative of performances observed by the first subsection.
To observe the performance of LMPR and MPR which are basically two algorithms of message broadcasting in P2P network, the process of message propagation between peers following these two schemes should be simulated. The simulation work in this paper is carried on the Java based PeerSim [
Function descriptions of main classes designed for simulating LMPR algorithm.
Class name | Function description |
---|---|
LmprED | LmprED, the core class of the algorithm LMPR, implements the interfaces of both CDProtocol and EDProtocol. The former interface is mainly used to simulate the action of initiating message broadcasting from source peer. And the later interface is mainly used to simulate the action of message transferring by general peers. Both two actions have the function of generating set of N2Set( |
|
|
RelayItem | RelayItem, an auxiliary class of LmprED, is in nature a data structure that helps to store the relay-information which includes relay-peers and relay-lists. |
|
|
LmprIdleProtocol | LmprIdleProtocol is an auxiliary class of protocol LmprED. It stores the broadcast message to and from the current peer, which includes message identity, sender, receiver, response state, total number of messages, and number of redundant messages. And LmprIdleProtocol also has the function of deciding if the current peer is in active at any given time. |
|
|
DecisionMakingState | DecisionMakingState, an auxiliary class of LmprIdleProtocol, is a data structure used to store the number of sent messages, the number of responded messages and the time when each message is sent. |
|
|
LmprMessage | LmprMessage is an auxiliary class of protocol LmprED and it is a data structure used to store the message package transmitted between peers. This data structure includes mainly a message’s identity, content, sender, and relay-list. |
|
|
LmprObserver | LmprObserver is in charge of outputting the simulation results of algorithm LMPR. Based on the parameters set in configuration file, it counts and outputs regularly the observed simulation results. Simulation results related to the scheme of LMPR in this paper are all output by the function of this class. |
This part shows the values of main performance characters of the two observed algorithms and their changing with time under the simulation performed in a classic static undirected P2P network. And the main configuration parameters of the network in simulation are listed in Table
Main configuration parameters of the network in simulation.
Parameter | Value | Description |
---|---|---|
SIZE | 100 | Number of nodes or peers in the simulated network. |
|
||
DROP | 0 | Network loss ratio, the value of zero means no packet loss in the network. |
|
||
MINDELAY | 10 | A parameter used to generate the minimum delay of transmitting after receiving a message, takes one percent of a cycle time as a unit. The minimum delay of transmitting is (CYCLE * MINDELAY)/100. |
|
||
MAXDELAY | 100 | A parameter used to generate the maximum delay of transmitting after receiving a message, takes one percent of a cycle time as a unit. The maximum delay of transmitting is (CYCLE * MAXDELAY)/100. |
|
||
STEP | CYCLE/20 | The time interval between two observations on simulation parameters takes the value of CYCLE/20 as a time unit when outputting simulation results. |
|
||
CYCLE | SIZE * 10000 | A parameter used to simulate the changing of time in milliseconds. |
|
||
MessageSize | 20 | The size of broadcast message is supposed to be 20 bytes. And this parameter is determined by the application, none of relay-list or relay-peer. |
In our simulation experiments, the network topology is generated by having each node that represents a peer in the network randomly select two other nodes and build edges with the latter ones. These edges represent the neighboring relationships between peers. Thus the topology of generated network is in the form of an undirected random graph [
Degree distribution of all nodes in the simulated network.
As a scheme of message propagation, the primary function of algorithm LMPR is to transmit the broadcast message to entire network as soon as possible. To observe this performance, we have measured the number of nodes having received the broadcast message on schemes of both LMPR and MPR in the simulated network and the result is plotted in Figure
Number of nodes having received the broadcast message.
The amount of messages resulted by a proposed algorithm is an important index of its performance. Figure
Total number of messages disseminated in the network.
As is known from Figure
Number of active nodes in the network.
The main objective of the proposed algorithm of LMPR in this paper is to reduce the amount of redundant messages in message propagation on the base of MPR while keeping its rate of network coverage almost unchangeable. Therefore, the number of redundant messages in the network is observed in our simulation and the results are shown in Figure
Number of redundant messages in the network.
Although the number of redundant messages generated by LMPR is less than that of MPR, the size of each message package in the former algorithm is larger than that of the latter because of the additional overhead brought by the assigned relay-lists described in Section
Network overhead resulted by message broadcasting.
Varying of network overhead with the size of broadcast message.
The simulation results presented by the previous part mainly show the performance of the two algorithms of LMPR and MPR in a classic stable P2P network with size of 100 nodes. To check if those performance characteristics observed can still hold on when the two algorithms work under P2P networks with different sizes and packet loss probabilities is the main task of the simulation described in this subsection. Figure
Average number of redundant messages per node.
Finally, the number of nodes having received the broadcast message is measured when the network size is set to 1000 and the packet loss probability varies from 0 to 1 with a step of 0.1. The simulation results are plotted in Figure
Number of nodes having received message varying with the packet loss probability.
Message propagation is used widely in unstructured P2P systems for resource searching and distributing. In this paper we have presented LMPR, a scheme of improved MPR for message propagation in distributed P2P system. Aiming at reducing the message redundancy of scheme of MPR while keeping its message coverage almost unchangeable, this paper proposes to add to the MPR scheme a technique of specified relay-list. By attaching to each relay-peer a relay-list with peers it will relay message to, the scheme assures that a broadcast message can be dispatched and only be dispatched once to every peer within 2 hops away from a decision-peer in its view.
Simulation experiments prove that the number of redundant messages resulted by algorithm of LMPR is much less than that of MPR. And if the size of the broadcast message is larger than some constant value such as 48-bytes of our experiment, then the network overhead resulted by the algorithm of LMPR becomes lower than that of MPR. Furthermore, the simulation results also show that the scheme of LMPR brings a smaller fluctuation to the system than MPR and the main performance characteristics can still hold on under P2P networks with different sizes and packet loss probabilities.
However, owing to the openness and anonymity of P2P systems, there always exists invalid relay-peers in message propagation such as free-rider or failure of peer [
There is no conflict of interests regarding the publication of this paper.
This work is supported by the Research Plan of Science and Technology of City Yiyang of China under Grant No. 2011JZ29 and the Colleges Oriented Science Research Project of Hunan Province of China under Grant Nos. 11C0248, 12C0571.