Keywords

77.1 Introduction

At present, the fairness in P2P network is a common problem, and most machines want to be not providers of resources but consumers of them. The research results indicate that 70 % Gnutella clients do not share any file. To construct a fair P2P network and promote the system efficiency, an effective method is to mainly consider the reputation mechanism of nodes [1], and to allow an entity to give its reputation score to another entity, and then the reputation can be used as a reference by other entities when they share resources, and another entity can obtain resources.

This paper has putted forward that a P2P entity can be caused to enter into P2P network and to fairly use network resources by providing the incentive mechanism of reputation score to it, and it obtains the corresponding number of resources according to its reputation score. The obtaining of reputation score has referred to the reputation score management system of P2P network Eigen Trust [2]. Active participant nodes can obtain their priority according to network bandwidth or Time to Live (TTL) when they compete for the resources of other nodes in network. The design method of this paper follows the principles of simplicity and easy realization, every node obtains a certain reputation score, and obtains the corresponding resources reward according to the score, then the behavior of free riding in a P2P network can be suppressed to some extent.

At present, the literature [3] also puts forward the calculation method of node reputation score based on value, the value is obtained during file upload, and files are downloaded according to the number of the value; another node reputation management is processed centrally on backstage [4], and there is also an independent calculation method of reputation score which does not depend on auxiliary nodes [5]. The method of this paper is different from these methods, the calculation is based on the service quality of a node, such as rapid download time, and enhanced network bandwidth, it is mainly used to control nodes with low reputation score, and it can cause P2P network to exhibit fair file sharing through the incentive mechanism when a malicious node undermines. The two fair sharing strategies facing bandwidth and TTL have been putted forward, and they can be combined with some other reputation score managements. Finally, these two algorithms about reputation score management are proved to be feasible and efficient through test and performance analysis.

77.2 Fair Sharing Strategies

The aim of this paper is to provide the incentive mechanism, which can cause nodes to fairly share the resources in P2P network and discard the nodes with free riding behavior or malicious behavior. But this system does not punish another kind of node, which is willing to contribute its network resources to the network, and does not download resources. This strategy uses the following two methods to calculate the reputation score of the active nodes entering into network: rapid download time and network bandwidth. Therefore, this paper gives two kinds of fair sharing strategies in P2P network: one faces bandwidth, and the other faces TTL. It is worth noticing that these two kinds of strategies based on reputation score are very common, they can be applied to some other systems of reputation score management, and also can be used independently.

For example, if the nodes Peeri and Peerj download files from Peerk at the same time, the bandwidth of Peerk will be divided. The bandwidths obtained by Peeri and Peerj from Peerk are calculated according to the reputation score, i.e.

Bandwidth (peeri) = score(peeri)/(score(peeri) + score(peerj))

Bandwidth (peerj) = score(peerj)/(score(peeri) + score(peerj))

This is the condition that two nodes compete for network resources at the same time. If several nodes compete at the same time, the algorithm of the fair sharing strategy is as following:

Supposing the node Peeri has the available network bandwidth B, B should be distributed to several nodes Peerj (j = 1, 2, 3n) which download files and data from Peeri. It can be described by pseudo codes as following:

For each peerj download data from Peeri do

{

Bandwidth (peerj) = B * score (peerj)/(score (peer1)

+score (peer2) +score (peer3) +score (peer n))

}

End

To limit network hops, dynamic query or TTL is set out; therefore the fair sharing strategy facing TTL is also important at present. For every query request in Gnutella, TTL is set as 7 at present. The fair sharing strategy facing TTL putted forward in this paper has set broader TTL for resources finding in network according to the reputation score. There are many ways to realize this aim, and a simple way is to define the maximum average TTL for every P2P entity (for example, High TTL = 10), and to define the minimum average TTL (for example, Low TTL = 5). The excitation of the node reputation score in this strategy is exhibited as the following algorithm.

If score (peer j) >=Average score then

TTL (peer j) = High TTL;

Else

TTL (peer j) = Low TTL;

End If

In this strategy, the problem worthy of attention is that every node must know the average participant reputation score in network, and the calculation of the average participant reputation score may decrease the number of messages in network. Every node must know the participant score of other nodes in network, so the average participant reputation score of nodes must be known in advance in a specific reputation score management system of P2P network. The reputation score management systems such as Eigen Trust are easy to meet this requirement.

77.3 System Test and Its Performance Analysis

77.3.1 The Reputation Score Management System Eigen Trust

This section will mainly describe the test and performance analysis of the system. This fair sharing strategy has used the node reputation score, so the specific reputation score management system of P2P network Eigen Trust is chosen for test. In Eigen Trust, the reputation score of a P2P entity reflects its active extent to participate in network. In the experiments, the test environment is constructed according to the literature [611], a node submits application and responds to query according to a certain interest in every query cycle, it can share and download the files of other nodes after it gets the response, it can provide the nodes with free riding behavior and malicious nodes by way of simulation, and it can share some suspicious files.

Figure 77.1 shows the relation between the reputation score of every node and the number of upload files in 15 query cycles in the system Eigen Trust. X axis is the reputation score, and Y axis is the number of download files. The node reputation in Eigen Trust is closely related to the number of upload files, and those nodes which can provide many upload files have high reputation score. The correlation is 0.97, which means that the upload number of credible files and the node reputation score have very close relation.

Fig. 77.1
figure 1

The relation between reputation score and files download in Eigen Trust

In the fair sharing strategy facing TTL, the problem of average reputation score should be considered. The total score of network is 1 in the system Eigen Trust, so the average reputation score of every node can be set as 1/n, in which n is the number of all the nodes in P2P network. Here, it is supposed that a node knows or roughly knows the number n of all the nodes in P2P network. For a large-scale P2P network, the total number of nodes is unknown, and then the node reputation score can be directly set as 1, so every node can compare its reputation score with the average reputation score 1/n of the whole network. If the node reputation score is larger than the average reputation score, TTL can be set as 5. If else, TTL can be set as 0. In these conditions, a node does not need to clearly calculate the average participant reputation score of network, and then the problem posed earlier has been solved.

77.3.2 Test Facing Bandwidth

The reputation score management system of P2P network Eigen Trust can be used to test the fair sharing strategy of this paper. First, the strategy facing network bandwidth is tested. This strategy attempts to obtain high reputation score through rapid download. The average speed of a node in P2P network is tested in the following two conditions: the fair sharing strategy with bandwidth and the common condition without fair sharing.

As is shown in Table 77.1, compared with a common P2P network, the average download speed of every user has very good performance through the combination of the bandwidth fair sharing strategy of this paper with the reputation score management system Eigen Trust. A congested network is simulated, and the following congestion control scene is deployed during the test process: a P2P entity Peer i downloads files from Peer j, it competes for the network bandwidth resources of Peer j with other five nodes (from 0 to 4) at first, and the number of nodes is random. It is worth noticing that, if the fair sharing strategy is used in the simulated scene, the active nodes can compensate their own participant reputation score. The compensation amount is considerable, and the download speed of most nodes is larger than 48.33 %. For example, if the network bandwidth is 10 Mb/s, the download speed of the node A is: 10 × 67.39 % = 6.739 Mb/s.

Table 77.1 The average download speed of the fair sharing strategy facing bandwidth (its percentage compared with the total bandwidth speed)

77.3.3 Test Facing TTL

In the test of the fair sharing strategy facing TTL, an important problem is that whether the reputation score management of this paper compensates those nodes with very high reputation score to let them have more time and chance for files download, and whether the free riding behavior can be avoided.

To accomplish the process above, 15 query cycles are chosen, and the algorithm of TTL setting is used in the test. The total number of nodes in P2P network is 100 (n = 100), and the default TTL is defined as 4, i.e. in a P2P network with 100 nodes, the search request of a node can reach 75 other nodes in 4 steps. In this condition, the average High TTL is defined as 5, and the average Low TTL is defined as 3.

In the test process, the P2P network is divided into two groups. Users in the first group have higher reputation score, i.e. the reputation score of every node is usually larger than the average reputation score 1/n in Eigen Trust. The reputation score of the users in the second group is smaller than the average reputation score 1/n. Table 77.2 shows the number of nodes of the first and second groups, and the corresponding average number of nodes which can be reached in the TTL range. The largest messages amount is given by:

Table 77.2 The test results of the fair sharing strategy facing TTL
  • Message_Amount = Nn * Nttl + NNn*NNttl

The experimental result indicates that the adoption of the fair sharing strategy facing TTL can decrease the query load in network. With the fair sharing strategy facing TTL, when all the nodes in the network put out a query request, the largest messages amount is 77 × 27 + 23 × 98 = 4,333. But with the common mode, the amount of network messages is about 74 × 75 + 26 × 75 = 7,500. Moreover, the nodes with the free riding behavior can not be exclude from the network in this process because they can look for their destination node in the condition TTL = 3.

77.4 Conclusions

This paper describes the two sharing strategies facing network bandwidth of nodes and facing TTL, which can construct fair sharing of P2P files. These two strategies have been tested in the specific reputation score management system of P2P network Eigen Trust, and the experimental results indicate that they can largely accelerate download time and decrease messages communication volume in network. These two sharing strategies based on reputation score have the advantages of simple design and easy realization. The next work is to consider more resources information (including software information and hardware information) in the calculation of reputation score and to research complicated algorithm of reputation score setting.