9
Future Generation Computer Systems 29 (2013) 361–369 Contents lists available at SciVerse ScienceDirect Future Generation Computer Systems journal homepage: www.elsevier.com/locate/fgcs A novel bartering exchange ring based incentive mechanism for peer-to-peer systems Kan Zhang , Nick Antonopoulos School of Computing, University of Derby, Kedleston Road, Derby DE22 1GB, UK article info Article history: Received 2 December 2010 Received in revised form 31 May 2011 Accepted 29 June 2011 Available online 8 July 2011 Keywords: Free riding Bartering exchange ring Incentive mechanism Reputation system Peer-to-peer abstract Peer-to-Peer (P2P) networking is an alternative to the cloud computing for relatively more informal trade. One of the major obstacles to its development is the free riding problem, which significantly degrades the scalability, fault tolerance and content availability of the systems. Bartering exchange ring based incentive mechanism is one of the most common solutions to this problem. It organizes the users with asymmetric interests in the bartering exchange rings, enforcing the users to contribute while consuming. However the existing bartering exchange ring formation approaches have inefficient and static limitations. This paper proposes a novel cluster based incentive mechanism (CBIM) that enables dynamic ring formation by modifying the Query Protocol of underlying P2P systems. It also uses a reputation system to alleviate malicious behaviors. The users identify free riders by fully utilizing their local transaction information. The identified free riders are blacklisted and thus isolated. The simulation results indicate that by applying the CBIM, the request success rate can be noticeably increased since the rational nodes are forced to become more cooperative and the free riding behaviors can be identified to a certain extent. © 2011 Elsevier B.V. All rights reserved. 1. Introduction Cloud computing has recently drawn great attention to the opportunity that serious business can be done in a secure and efficient way. Peer-to-Peer (P2P) networking has been used as one of its resource discover techniques [1]. In this paper, P2P is considered to be an alternative to the cloud computing for the relatively less formal business. One of the major obstacles to the development of P2P systems is the free riding problem [2]. That is, a certain portion of the users only consume resources from the system but do not contribute to the others. Therefore, the success of the requests largely depends on the level of altruism of the system. A number of measurements [2,3] discover that in P2P systems, only a small number of altruistic nodes serve the majority of the system requests. As a result, the network topology is transformed to scale-free [4], degrading the network scalability and fault-tolerance. More significantly, the free riding problem also results in low content availability, which is contrast to the sharing philosophy of P2P systems. To solve the problem, extensive researches have been con- ducted in order to introduce incentives to the systems and thus influence the users to cooperate with each other. One of the most common solutions is the Reputation-based Systems [5–7], which Corresponding author. E-mail addresses: [email protected], [email protected] (K. Zhang), [email protected] (N. Antonopoulos). use a reputation value to represent nodes’ contributions in their past transactions. A requester, with higher reputation value, will be allocated more resources or services with better quality. How- ever, most of such reputation systems are impractical due to the complexity of rating collection, source validation and information aggregation [8]. Recently, the Bartering Exchange basedapproach has drawn increasing attention [9,10]. Barter is one of the oldest human economic activities. In the barter economic system, services are directly exchanged for other services without a medium of exchange, such as money [11]. In P2P systems, the nodes with mutual or asymmetric interests can be organized in a ring structure where every node provides one service to its successor and receives one service from its predecessor. This scheme enforces the nodes to contribute while consuming. Therefore the free riding nodes cannot gain any complete services and have to adapt their strategy to more cooperative ones or simply leave the network. The existing bartering exchange ring formation approaches only rely on the past search attempts for supply and demand information collection. This is inefficient since the messages of the Query Protocol are not informative. Moreover, this static approach takes the risk that the supply and demand information would be out of date. More importantly, the bartering exchange ring based incentive mechanism inherently is not effective against the malicious nodes. For instance, a free riding node can intentionally try to break the rings by refusing to leave the network. This paper presents a novel cluster based incentive mechanism (CBIM) that overcomes the above problems. It proposes a cluster 0167-739X/$ – see front matter © 2011 Elsevier B.V. All rights reserved. doi:10.1016/j.future.2011.06.005

A novel bartering exchange ring based incentive mechanism for peer-to-peer systems

Embed Size (px)

Citation preview

Future Generation Computer Systems 29 (2013) 361–369

Contents lists available at SciVerse ScienceDirect

Future Generation Computer Systems

journal homepage: www.elsevier.com/locate/fgcs

A novel bartering exchange ring based incentive mechanism forpeer-to-peer systemsKan Zhang ∗, Nick AntonopoulosSchool of Computing, University of Derby, Kedleston Road, Derby DE22 1GB, UK

a r t i c l e i n f o

Article history:Received 2 December 2010Received in revised form31 May 2011Accepted 29 June 2011Available online 8 July 2011

Keywords:Free ridingBartering exchange ringIncentive mechanismReputation systemPeer-to-peer

a b s t r a c t

Peer-to-Peer (P2P) networking is an alternative to the cloud computing for relativelymore informal trade.One of themajor obstacles to its development is the free riding problem, which significantly degrades thescalability, fault tolerance and content availability of the systems. Bartering exchange ring based incentivemechanism is one of the most common solutions to this problem. It organizes the users with asymmetricinterests in the bartering exchange rings, enforcing the users to contribute while consuming. Howeverthe existing bartering exchange ring formation approaches have inefficient and static limitations. Thispaper proposes a novel cluster based incentive mechanism (CBIM) that enables dynamic ring formationby modifying the Query Protocol of underlying P2P systems. It also uses a reputation system to alleviatemalicious behaviors. The users identify free riders by fully utilizing their local transaction information. Theidentified free riders are blacklisted and thus isolated. The simulation results indicate that by applying theCBIM, the request success rate can be noticeably increased since the rational nodes are forced to becomemore cooperative and the free riding behaviors can be identified to a certain extent.

© 2011 Elsevier B.V. All rights reserved.

1. Introduction

Cloud computing has recently drawn great attention to theopportunity that serious business can be done in a secure andefficient way. Peer-to-Peer (P2P) networking has been used asone of its resource discover techniques [1]. In this paper, P2P isconsidered to be an alternative to the cloud computing for therelatively less formal business. One of the major obstacles to thedevelopment of P2P systems is the free riding problem [2]. Thatis, a certain portion of the users only consume resources fromthe system but do not contribute to the others. Therefore, thesuccess of the requests largely depends on the level of altruismof the system. A number of measurements [2,3] discover that inP2P systems, only a small number of altruistic nodes serve themajority of the system requests. As a result, the network topologyis transformed to scale-free [4], degrading the network scalabilityand fault-tolerance.More significantly, the free riding problemalsoresults in low content availability, which is contrast to the sharingphilosophy of P2P systems.

To solve the problem, extensive researches have been con-ducted in order to introduce incentives to the systems and thusinfluence the users to cooperate with each other. One of the mostcommon solutions is the Reputation-based Systems [5–7], which

∗ Corresponding author.E-mail addresses: [email protected], [email protected]

(K. Zhang), [email protected] (N. Antonopoulos).

0167-739X/$ – see front matter© 2011 Elsevier B.V. All rights reserved.doi:10.1016/j.future.2011.06.005

use a reputation value to represent nodes’ contributions in theirpast transactions. A requester, with higher reputation value, willbe allocated more resources or services with better quality. How-ever, most of such reputation systems are impractical due to thecomplexity of rating collection, source validation and informationaggregation [8].

Recently, the Bartering Exchange basedapproach has drawnincreasing attention [9,10]. Barter is one of the oldest humaneconomic activities. In the barter economic system, servicesare directly exchanged for other services without a medium ofexchange, such as money [11]. In P2P systems, the nodes withmutual or asymmetric interests can be organized in a ring structurewhere everynodeprovides one service to its successor and receivesone service from its predecessor. This scheme enforces the nodesto contribute while consuming. Therefore the free riding nodescannot gain any complete services and have to adapt their strategytomore cooperative ones or simply leave the network. The existingbartering exchange ring formation approaches only rely on the pastsearch attempts for supply and demand information collection.This is inefficient since the messages of the Query Protocol arenot informative. Moreover, this static approach takes the riskthat the supply and demand information would be out of date.More importantly, the bartering exchange ring based incentivemechanism inherently is not effective against themalicious nodes.For instance, a free riding node can intentionally try to break therings by refusing to leave the network.

This paper presents a novel cluster based incentive mechanism(CBIM) that overcomes the above problems. It proposes a cluster

362 K. Zhang, N. Antonopoulos / Future Generation Computer Systems 29 (2013) 361–369

based dynamic bartering exchange ring formation method thatenables the nodes to form a ring during the search by modifyingthe Query message to be the medium through which the nodescan publish their requests and provisions. It also proposes alightweight reputation system that allows the nodes to accountthe misbehaviors. Every node records the performance of theirtransaction partners and works out a reputation value for each ofthem by only using the local transaction information. The nodesincrease the reputation value of a specific node after having asuccessful transactionwith it anddecrease its reputation value viceversa. Each nodemaintains a blacklist that only records those withlowest reputation values. The nodes can then predict and isolatethe potential free riders by refusing to participate in the same ringswith them.

The rest of the paper is arranged as follows: Section 2 presentstwo typical bartering exchange ring formation approaches anddiscusses their limitations. Section 3 explains the cluster basedring formation approach, including the modified query protocolspecification, graph theoretical representation of cluster and rings,ring identification algorithm and Queryhit Caching mechanism.The proposed reputation system is demonstrated in Section 4 andthe evaluation of the CBIM is presented in Section 5, which isfollowed by a conclusion in Section 6.

2. Related work

Bartering exchange ring based incentivemechanism is themainfocus of this paper. The simplest form of bartering exchange isthe bilateral barter between two nodes with mutual interests.BitTorrent [12] is the most popular P2P protocol that appliesthe bilateral bartering incentive mechanism. All the resources aredivided into small segments with equal size. BitTorrent organizesnodes with the same interest into a group and enables them todownload and upload resource segments among themselves. Thenodes providingmoreupload rate are likely to get higher downloadspeed in return. However, the BitTorrent cannot be applied inan application with high service diversity since it requires theresources shared by the nodes to be dividable. Furthermore, thediscovery of two nodes with mutual interest can be difficult.Aperjis et al. [13] states that the flexibility of the barter can beimproved by increasing the size of the bartering exchange rings.

To form multiple-way bartering exchange rings, Anagnostakiset al. [9] propose a mechanism where every node has an IncomingRequest Queue (IRQ) that maintains all the nodes that requesteda local resource. Every node also has a request tree which has thehierarchy structure: the root of the tree is the node; the first layerchild nodes are the nodes in its IRQ; the next layer nodes are thenodes registered in the current layer nodes’ IRQs. The depth of thetree is limited to 5. A node keeps checking if anynodes in its requesttree can satisfy its request. If so, a bartering exchange ring can beformed.

Cabanillas [10] proposes another method to form barteringexchange rings. A set of nodes is selected as Directory Nodes (DN).The DNs are interconnected and responsible for answering queriesfrom the ordinary nodes. Every DN maintains a Have List (HL) thatconsists of the services available amongst its associated ordinarynodes as well as a Want List (WL) which contains the requestsit received from its ordinary nodes and other DNs. When a DNcannot directly respond to a query, it forwards the query to theDN network and checks the HL and WL of the other DNs to from abartering exchange ring.

Both of the above methods have two problems in common:(1) Inefficient, throughout a search attempt, at most one requestcan be served and all the nodes involved can only acquire verylimited supply and demand information about the initiator andthe provider; (2) Static, the nodes check historical records to

Fig. 1. Nodes classification.

form bartering exchange rings, taking the risk that the recordedinformation is out of date.

In this paper, the nodes in P2P systems are classified intothree categories: Altruistic nodes, Rational nodes and Free riders.Altruistic nodes are always cooperative, that is, they are alwayswilling to answer queries. Rational nodes always try to maximizetheir own utility. They start with free riding strategy, that is, theydo not provide any services to the others. If they cannot gainenoughprofit by free riding theywill change their strategy to share:they participate in the service exchange but stop serving othersonce they receive the complete requested services. If they are notsatisfied with the utility gained by using the share strategy, theywill adapt their strategy to cooperative. If the Rational nodes usingcooperative strategy still cannot gain satisfactory utility, they willleave the network. Free riders use free riding strategy andwill leavethe network if they cannot gain any profit over a certain period oftime.

The bartering exchange ring based mechanism also has someinherent limitations. By using this type of incentive mechanism,the free riders should eventually leave the network since theycannot gain any services without contributing to others. Thefree riding rational nodes would change to use either share orcooperative strategy, depending on their satisfactory threshold.However, if a rational node is malicious, it can use the sharestrategy and intentionally request small resources and promiseto provide bigger ones. In this case, they are highly likely toobtain complete resources before they finish serving the otherring members and thus achieve a higher request success rate.Consequently, they are less likely to change their strategy tocooperative than the normal rational nodes. Moreover, a maliciousfree rider may use a free riding strategy and refuse to leave thenetwork. This could seriously affect the overall network requestsuccess rate. Fig. 1 shows the types of nodes and their strategies.

3. Cluster based ring formation approach

In this section, a novel cluster based bartering exchange ringformation approach is presented in detail. To overcome theinefficiency and static problemsmentioned in the previous section,the Query Protocol of the underlying P2P networks is modifiedwhere the query message can be used as a medium throughwhich any nodes on a query path can publish their requests andprovisions. This modification enables the nodes to form barteringexchange rings dynamically. The search terminates when thenodes on a query path can form a cluster, that is, all the requestsfrom the cluster members can be satisfied among themselves. Thefollowing subsections elaborate the query protocol modification,prove that a cluster consists of bartering exchange rings, describean algorithm for bartering exchange ring identification and acaching mechanism for static ring formation.

3.1. Query protocol specification

This section presents a detailed specification of the CBIM QueryProtocol by which the nodes form clusters, including the messagestructures and message processing procedure. Table 1 showsdescriptions of the Query Protocol messages:

K. Zhang, N. Antonopoulos / Future Generation Computer Systems 29 (2013) 361–369 363

Table 1Descriptors of query protocol.

Message Description

Query Issued when a node wants to search for one or more services.Modified when a node wants to join in creating a cluster.

QueryHit The response to a Query. It contains information about the supplyand demand of the potential cluster generated by thecorresponding Query.

3.1.1. Query messageThe Query message is the medium through which the nodes

share the demand and supply information. The CBIM modifies theQuery messages by allowing any nodes to add their own requestsand provisions. However, it is unrealistic to assume that all theservices have the same execution time or that a piece of softwareexists that can monitor and compel the nodes to provide promisedservices. Therefore, there are opportunities that nodes use a sharestrategy and harm the other ring members.

To avoid or alleviate the damage caused by such behaviors,the initiator of the query can put some constraints in the querymessage to ensure a certain level of compatibility of the resourcesin the clusters. Thus, some existing service exchange techniquescan be applied. Depending on the dividability, the resources can bedistinguished by single andmultiple capacity resources [14]. Singlecapacity resources can only be consumed as a whole whereasthe multiple capacity resources can be consumed by multipleoperations.

(a) Multiple capacity resources such as music and streaming filescan be split into small segments [12]. The nodes can transferthe files segments after they validate the received ones [9].The nodes can also add constraint on the upper limit of theresource size and the minimum speed to balance the datatransfer duration.

(b) For single capacity services like Software as a Service (SaaS)and Infrastructure as a Service (IaaS), one can add timeduration constraints on the service consumption to limit thedamage [14].

The structure of the Query message is given in Box I.

Message ID (16 bytes): the unique message descriptor ID on thenetwork.

Initiator IP (4 bytes): the IP address of the query initiator.

Port (2 bytes): the Port number where the initiator can acceptincoming connections.

Requests: A set of requests of the nodes on the query path. Eachelement of the requests has the following structure:

Requester IP Services expression0 3 4 . . .

Requester IP (4 bytes): IP address of requesters.Services Expression: a set of keywords represent the requests.

Provisions: A set of provisions of the nodes on the query path. Eachelement of the requests has the following structure:

Provider IP Port Services expression0 3 4 5 6 . . .

Provider IP (4 bytes): IP address of requesters.Port (2 bytes): the Port number where the provider can accept

the incoming connections.Services Expression: a set of provision keywords

Initiator Constraints: regulations specified by the query initiator.Currently, it includes the following five fields:

Ringsize

Servicetype

Resourcesize

Speed Freeconsumption

Maxaccesses

0 1 2 3 4 7 8 9 10

Ring Size (1 byte): the maximum size of the rings.Service Type (1 byte): specifies the service type that is accepted

during the query propagations.0x00 = any service.0x01 = multiple capacity.0x02 = single capacity.Resource Size (2 bytes): Themaximumsize (KB) of themultiple

capacity resources.Speed (4 bytes): The minimum upload speed (KB/second) of

nodes that should respond to this message.Free Consumption (2 bytes): The maximum time period

(second) that nodes can consume the single capacity resources forfree.

Max Accesses (1 byte): maximum number of accesses if theservice is sharable. This is to prevent a hot spot when a sharableresource is very popular.

3.1.2. QueryHit messageIf a cluster can be formed, the last member of the cluster should

notify the query initiator by sending it a QueryHitmessage that hasthe following structure:

Message ID Requests Provisions0 15 16 . . . n n+1 . . .

Message ID: the message ID should be the same as thecorresponding Query message.Requests: The set of requests obtained from the Requests field ofthe corresponding Query message.Provisions: The set of provisions obtained from the Provisions fieldof the corresponding Query message.

3.1.3. Query processingThe nodes can join the cluster and issue their requests but only

if they can make contributions to the cluster. To ensure fairness,the nodes need to provide the same number of services to others inorder to obtain the requested services. The reason that the servicesare evaluated in terms of quantity is that in the service orientedenvironment it is impractical to design a versatile mechanism tomeasure the quality of services that are from various contexts. Thebinary rating mechanism is used to evaluate the quality of theservice which is only determined by the requesters’ satisfaction.The contribution can be considered as: (1) it can serve the requestsof the existing cluster members; (2) it can provide services thatincrease the possibility of cluster formation.More specifically, oncereceiving a Query message, a node conducts the following processrepresented in Fig. 2.

It first of all checks the requests table against its own resourcesto determine if it can serve some existing requests. If so, it triesto serve as many requests as possible. For its own requests, thehighest priority is to take the existing resources. The secondpriority is to check whether it has common interests with theexisting cluster members on the sharable resources, which canbe accessed simultaneously by multiple nodes. The third priorityis to issue new request tuples that consist of its own requests.It should be observed that when the node can serve the samenumber of requests as it can take from the existing clustermembers, the node should check whether a cluster can be formed.

364 K. Zhang, N. Antonopoulos / Future Generation Computer Systems 29 (2013) 361–369

Fields Message ID Initiator IP Port Requests Provisions Initiator constraintsByte offset 0 15 16 19 20 21 22 . . . n n + 1 . . . m m + 1 . . . m + 12

Box I.

Fig. 2. Query message processing.

That is, all the requests recorded in the Query message can befound in its provision table. If so, the node should send a QueryHitmessage back to the initiator along the reverse query path and stopforwarding the Query further. If the node cannot serve any existingrequests, it can directly check whether it has common interestson resources that allow inclusive access with the existing clustermembers. If so, it can also register with these requests and providesome number of its own resources to attract providers of theserequested resources.

3.2. Cluster and bartering exchange rings

The nodes in P2P networks can be represented as vertexes andthe service exchange between the nodes can be represented asdirected edges. For instance, a node that provides two services andreceives two services can be represented as a vertex with twooutgoing edges and two incoming edges. The supply and demandof the networks can be represented by directed graphs. In theCBIM, every node should request and provide the same numberof services. Therefore, a cluster can be represented by a directedgraph where every vertex has the same indegree and outdegree.According to [15], such a directed graph is called a Eulerian Graph.Similarly, a service exchange ring can be represented by a directed

graph in which every vertex has one incoming and one outgoingedge. In graph theory, such a directed graph is called a DirectedCircuit. One of the Theorems related to Eulerian graph is that adirected Euler graph is either a directed circuit or an edge disjointunion of directed circuits. Therefore, it can be proved that a clusterconsists of either one or a set of service exchange rings.

3.3. Ring identification

On receiving the QueryHit messages, the query initiator isthen responsible for selecting cluster and identifying the serviceexchange rings from the cluster. To alleviate the search latency, theCBIM chooses the first QueryHit by default. Identifying barteringexchange rings from a cluster is equivalent to finding all thedirected circuits from an Eulerian graph by using each edgeonly once. The ring identification algorithm proposed in thispaper is inspired by Fleury’s algorithm [15] which is designed forconstructing a Eulerian Tour from a Eulerian graph. A Eulerian Touris a closed path that uses every edge in a Eulerian Graph exactlyonce. The pseudo-code of our algorithm is presented in Fig. 3.

The cluster graph is denoted by C (V , E), where V is the set ofvertices and E is the set of edges. The set of directed circuits withinthe cluster graph is denoted by DC.

K. Zhang, N. Antonopoulos / Future Generation Computer Systems 29 (2013) 361–369 365

Fig. 3. Algorithm to find all the directed circuits in a directed graph.

Fig. 4. Algorithm to find an n-node ring from SDT.

3.4. QueryHit cache

In case a node fails to form clusters during the search, theCBIM also supports a static alternative for bartering exchange ringformation. When a QueryHit message is sent back to the initiator,the nodes along the query path also cache it. Then they can extractand store the requests and provisions of each ring member in theirSupply and Demand Table (SDT). Every entry in an SDT has threefields: Node ID, Requests and Provisions. Fig. 4 shows the algorithmthat is used to find a ring from the SDT

Compared to the existing static ring formation approach, thismethod can gather information faster because the query messagecan be much more informative and thus reduce the risk that theinformation is out of date.

3.5. Ring formation

Once the bartering exchange rings are identified, the query ini-tiator is then responsible for sending each ring member a formmessage to inform them who should provide what to whom. Theform message consists of three fields: Member, Service and Succes-sor. Member is the IP address of a ring member; Service is the ser-vice it should provide in this service exchange ring and Successorrefers to a {IP, Port} pair which specifies the successor’s IP addressand the port number that can accept incoming connections.

Ring membership0 . . .

RingMembership: structure of the service exchange ring. Eachelement of the field has the following structure:

Member IP Service Successor IP Successor port0 3 4 7 8 11 12 13

Member IP (4 bytes): the IP address of a ring member.Service (4 bytes): the service that the ring member should

provide.Successor IP (4 bytes): the IP address of the ring member’s

successor.Successor Port (2 bytes): the Port number of the ringmember’s

successor that can accept incoming connections.

4. Lightweight reputation system

After the identification of the potential bartering exchangerings, the nodes start exchanging serviceswith their ringmembers.As discussed in Section 2, the bartering exchange ring basedincentive mechanism can influence the obedient free riding nodesto either become more cooperative or leave the network, but itis fragile to malicious nodes. Moreover, it is unrealistic to assumethat there exists a piece of software that can monitor and enforcethe nodes to provide promised services. Therefore, a lightweightreputation system is proposed to prevent malicious behaviors.Every node maintains a Suspect Table to record the misbehaviorsof their transaction partners and calculates a reputation value foreach of them. The suspect nodes with lowest reputation values arerecorded in the blacklist. The nodes try to avoid participating inthe same ring with the blacklisted nodes and therefore isolate themisbehaving ones in the network level.

4.1. Simple reputation value

A free riding node can be easily detected by its successors inthe service exchange rings as they fail to receive the requestedservices. To ensure fairness, this node needs to be stopped fromgetting services. However, the free rider identification shouldnot rely on individual reports since global accounting would berequired to verify the reporter’s creditability. In a global accountingmechanism, the past performance of a node is quantified asa reputation value, which is increased if the node is beingcooperative and drops if it free rides. Such a global approach isimpractical since it is time consuming and generates significantmessaging overhead [16]. In addition, once free riding happens ina ring, the service exchange chain breaks and thus it is impossibleto punish one member without affecting others’ services.

A rule is introduced that once the free riding is detected ina ring, the members stop serving their successors. As the ringmembers stop providing services in turn, the ring collapses bythe chain effect. It can be assumed that the chain effect should

366 K. Zhang, N. Antonopoulos / Future Generation Computer Systems 29 (2013) 361–369

Fig. 5. Suspicious degrees and goodness.

quickly approach the free rider before it finishes the consumptionof services. Every node only records the nodes that participated incollapsed rings in their Suspect table. The nodes then rely on theirpersonal experience to predict these nodes’ behaviors in the future.In this way, the complexity of the system is significantly reducedas global data collection and aggregation is not required.

Each entry in a suspect table contains 3 elements:

• Suspect Node ID: The identifier of the suspect node.• Probability Queue: a set of probabilities that the corresponding

node is a free rider in the collapsed rings. In a collapsed ringwith size s, the table holder assigns all the members with anequal probability which inverses to the size of the collapsedring, that is, 1/(s − 1). To keep the table lightweight in terms ofsize and calculation complexity, a First in First out (FIFO) queueis used to store the probabilities, meaning, if a queue is full anda new probability is about to be inserted, the oldest probabilitywill be deleted. In this way, the nodes’ most recent activitiesare always recorded. The nodes should periodically delete theoldest probability from each entry from their Suspect Tables.The rational nodes are then given opportunities to changestrategy.

• Simple Reputation Value (SRV): a normalized average probabil-ity that the corresponding node is not the free rider that causedthe ring collapse. A node should get lower SRV than others ifit participated in more collapsed rings or it appears in smallerones. Let n denote the size of the queue, pi denote the probabil-ity where i indicates the position in the queue. The SRV for eachsuspect is calculated according to following expression:� Simple Reputation Value =

ni=0(1 − pi).

The SRV is smaller if a suspect node participated in more collapsedrings or smaller rings. However, it does not look into the ratio ofcollapsed rings out of the total number of rings.

4.2. Goodness

Another metric is to look into the successful rings to differenti-ate the cooperative nodes from the free riding ones. The principleis to periodically compare the ratio of successful rings of a suspectwith what is expected statistically from the table holder’s perspec-tive.

Let {S} be the set of the suspect nodes for table holder (TH). Thenumber of rings TH participated in is denoted as T and the numberof collapsed ring out of T rings is denoted as C . Si is the ith suspectnode in TH’s suspect table and its SRV is denoted SRV i. Let Ci bethe number of collapsed rings Si participated with the TH. Pij is theprobability Si is a free rider in its jth collapsed ring with the TH. LetTi be the total number of rings Si participated with the TH.

Since the attempts of exchanging services in the rings areindependent and there are only two outcomes of each attempt:

success and collapse. From the TH’s perspective, the probabilitythat a ring collapses can be calculated as:

pTH =CT

.

The probability that the members of a ring can successfully finishthe service exchange is:

qTH = 1 − pTH .

For every suspect Si, the probability distribution of Ci is binomialprobability distribution. The probability that Si participated in xcollapsed rings out of Ti rings can be calculated as:

p(x) = CxTip

xTHq

(Ti−x)TH .

The degree of suspicion of Si can be determined by the probabilitythat Si participated in less than Ci collapsed rings as the left partillustrated in Fig. 5. This can be calculated by using the followingequation:

Suspicion = Pr(x ≤ Ci) =

Cii=0

p(i).

The Goodness of Si is illustrated as the right part of the Fig. 5. It canbe then calculated as:

Goodness = 1 − Suspicion.

4.3. Ultimate reputation value

For every suspect of Si, if the ratio of successful rings itparticipated with is better than what was expected statistically,then its SRV should be given a significant Goodness weight.Otherwise, the SRV should be reduced accordingly. The ultimatereputation value (URV) can be obtained by adapting the SRV withGoodness:

URV = SRV + Goodness.

Let SRV, Goodness and URVdenote a suspect Si’ SRV, Goodness andURV. Let SRV ′, Goodness′ and URV ′ denote its SRV, Goodness andURV after another transaction. In the following paragraphs, thechange of URV under different circumstances is evaluated:• The suspect Si and the TH participate in a succeed ring together.

Its SRV does not change. The difference of the URV can bedenoted as ∆+ and calculated as follows:

∆+= URV ′

− URV= SRV ′

+ GoodNess′ − (SRV + Goodness)

= C iTip

Ci+1TH qTi−Ci

TH > 0.

It is noticeable that the∆+ is always bigger than0. Therefore, in ourreputation system, the nodes will have a higher reputation value ifthey participate in rings that succeed.• A suspect Si and the TH participate in a collapsed ring together.

The difference of the URV can be denoted as ∆− and calculatedas follows:

∆−= URV ′

− URV= SRV ′

+ GoodNess′ − (SRV + Goodness)

=

ni=0

(1 − pi) × (−Pi+1) +

pCi+1TH qTi−Ci

TH

1 −

Ti + 1Ci + 1

≤ 0.

It is noticeable that the ∆− is smaller than 0 in most of thecircumstances. The ∆− is 0 only when the URV is already 0.Therefore, in our reputation system, the nodes’ reputation valueswill drop if they participate in rings that collapse.

K. Zhang, N. Antonopoulos / Future Generation Computer Systems 29 (2013) 361–369 367

Fig. 6. Request success boundaries.

4.4. Blacklist

A low reputation value indicates that the corresponding node isvery likely to be the free rider which caused the ring to collapse.Every node also maintains a blacklist to record nodes with thelowest reputation values. The nodes only refuse to join the ringsthat blacklisted nodes are involved with. However, the size of theblacklist needs to be carefully controlled according the cooperativelevel of the systems. If the blacklist is undersized, the holdernode may join many rings that contain free riders. If the blacklistis oversized, the node cannot participate in any rings since toomany nodes are considered as free riders. A threshold θ is used todenote the percentage of the size of the blacklist out of the suspecttable. The setting of this threshold employs the slow start strategyfrom the Transmission Control Protocol (TCP) congestion controlmechanism.

After a certain time period, a node checks the percentage ofnumber of rings it denied out of the number of rings collapsed.If this rate is below a predetermined threshold, which is denotedas the attempt denial threshold (ADT), it will increase the θexponentially, until it reaches the slow start threshold (STT). At thebeginning, the θ is set to be 5% and the STT is set to 50%. After the θreaches the STT, the node increases the θ linearly until the attemptdenial rate in a time period is higher than the ADT. Then the nodereduces the STT to half of the current θ and resets the θ to the initialsetting 5%.

4.5. Free rider isolation

The nodes can simply avoid joining the same ring with theblacklisted nodes or limiting their access to bigger ring. Afterreceiving a form message from the cluster initiator, the nodescan check the members of the proposed service exchange ringsagainst their own blacklist. If one ormoremembers are blacklisted,the ring will be discarded. That is, the nodes refuse to establishconnections to the possible free riding nodes. In thisway, the nodeswith free riding strategy should be rejected as the blacklists arewell established and thus will not have opportunities to get anyservices.

5. Evaluation

This section presents the evaluation of the proposed reputationsystem. A simulator is implemented upon the Protopeer [17],which is an open source P2P simulation platform. The experimentsare designed to test the effectiveness of the reputation system. Thekey metric is the request success rate, that is, the percentage of therequests that are successfully satisfied.

The experiments were carried out in a 1000 node Gnutella net-work where on average 300 nodes have demands simultaneously.There were 200 categories of resources in total and each categoryof resourcemay havemultiple objects. Every node had 4 neighbors

Fig. 7. Request success rate with bartering exchange rings.

and the TTL is set to 4. Every node had 4 interests and 8 resources.The percentage of the altruistic nodes, normal rational nodes, ma-licious rational nodes, normal free riders and malicious free riderswere 10%, 30%, 30%, 15% and 15% respectively. Every experimentwas carried out in 100 runs in which the nodes search for all oftheir requests at random timewithin 1000 time units. The networkchurn was set to 5%.

As Shown in Fig. 6, the request success rate in the originalGnutella network stayed stable around 17%. This is because thesuccess of the queries only relies on the altruistic nodes and thereis no incentive for the rational nodes to change their initial freeriding strategy. When all the nodes are altruistic, the most optimalrequest success rate can be obtained in this network was around73%.

5.1. Bartering exchange ring

By using the CBIM, we managed to find a bartering exchangering for around 90% of the requests. The nodes should periodicallycheck their request success rate against a satisfactory threshold(ST). If a node’s request success rate is lower than the ST, it maycheck its strategy accordingly (Section 2). The period was set to4000s and the ST was set to 30%.

Fig. 7 shows the request success rate of the network withoutusing the proposed reputation model. The request success ratewent up sharply from 2% to 25% during the first several runs.Meanwhile, the rational nodes changed their strategy from freeriding to share immediately after their first success rate check.During the same period, most of the normal free riders left thenetwork as they could not obtain any services by using thebartering exchange rings. Throughout the experiment, there werenew normal free riders who joined the network in every run,but they never achieved the satisfactory threshold and ended upleaving the network.

Fig. 8 demonstrates that the request success rate stayed around30% until dropped to the first low point at about 22% at the 25thrun. During this period, around half of the normal rational nodesbecame cooperative. Most of themalicious rational nodesmanagedto achieve 30% request success rate and remained malicious shareat first and became cooperative after the sudden request successrate decrease. The request success rate then stayed around 30%until the 50th run and dropped below 30% for about 10 runs.During this period, about 60% of the normal rational nodes becamecooperative while the malicious share was the dominant strategyfor the malicious rational nodes. The request success rate thenslowly increased to around 35% and peaked at just above 40% for 3times since more normal rational nodes became cooperative.

There is a clear indication that the malicious share strategyhad gained the rational nodes more utility than using normalobedient strategy. Although the normal free riders were ruled out,the overall request success ratewas not improved significantly dueto the malicious behaviors.

368 K. Zhang, N. Antonopoulos / Future Generation Computer Systems 29 (2013) 361–369

a b

Fig. 8. Strategy distributions of rational nodes.

Fig. 9. Request success rate with proposed reputation system.

5.2. Proposed reputation system

To apply the proposed reputation model, the nodes need toupgrade their pTH periodically to calculate the Goodness of eachsuspect. This periodwas set to be 5000 s. Fig. 9 shows that by usingthe proposed reputation system, the request success rate went uprapidly from 6% to around 50% and stayed above 45%.

Fig. 10 presents the strategy distribution of the rational nodes.It shows that most of the rational nodes turned to be cooperativeregardless whether they were malicious or not. During theexperiment, the number of cooperative rational nodes slightlydecreased since some of them left the network due to the networkchurn. The newly joined rational nodes achieved 30% requestsuccess rate easily even with share strategy given the total numberof cooperative nodes.

Fig. 11 shows the precision of the blacklists using URV. At thebeginning of the experiment, the URV equals SRV as the Goodnesscannot be calculated without statistic records. The figure showsthat the free riding nodes were quickly blacklisted by the nodes,

indicating the effectiveness of SRV at the early stage of networkestablishment. The percentage of cooperative nodes graduallydecreased throughout the experiment despite some fluctuations.This indicates that by using the URV, the nodes can distinguish thecooperative level of nodes to a certain extent.

6. Conclusion

This paper proposes a cluster based incentive mechanism forP2P systems. It extends the existing bartering exchange ringbased incentive mechanisms in two aspects: (1) it enables thenodes to form bartering exchange rings dynamically as well asstatically, improving the feasibility of the bartering economy in thedistributed environment; (2) the CBIM also proposes a reputationmodel to alleviatemalicious behaviors. The nodes can use the localtransaction record to predict and isolate the free riding nodes. Thesimulation results suggest that the CBIM can effectively improvethe overall request success rate of P2P systems.

The local blacklists may be not effective against the rationalnodeswith a share strategywhen the unified satisfaction thresholdis set lower than the overall request success rate. This is possiblydue to (1) the local blacklist cannot be used to predict strangers’behaviors; (2) the unified preset satisfaction threshold cannotadapt the dynamic generosity level of the network. Therefore, theavenues for future research based on this limitation of the CBIMinclude:Collective community blacklist

The accuracy of the reputation can be improved if moreinformation sources are approached. In future work, the nodesshould be able to share their blacklists with the reputable nodes.Instead of replacing the local blacklist with a converged globalblacklist, the nodes can simply generate a separate communityblacklist. The nodes still make deny decisions mainly based on

a b

Fig. 10. Strategy distributions of rational nodes.

K. Zhang, N. Antonopoulos / Future Generation Computer Systems 29 (2013) 361–369 369

Fig. 11. Blacklist precision.

their local blacklist and use the community blacklist to confirm thedecision.Dynamic satisfaction threshold

In real applications, a node should be able to dynamically adjustits satisfaction threshold (st). During a certain time period, if anode’s request success rate reaches the st, it can slightly increase itsst as its expectation grows. Thiswould also increase the probabilityfor the node to adapt a more cooperative strategy in next timeperiod. If the node is using the cooperative strategy and its requestsuccess rate is below the st, instead of leaving the networkimmediately, the node can slightly reduce the st and try severalmore timeperiods. However, the st should never go belowa certainvalue which can be determined by request success rate of theunderlying P2P network without using any incentive mechanisms.

References

[1] R. Ranjan, L. Zhao, X. Wu, A. Liu, Peer-to-peer cloud provisioning: servicediscovery and load-balancing, Computer Communications and Networks 0(Part 2) (2010) 195–217.

[2] E. Adar, B. Huberman, Free riding on Gnutella, First Monday, vol. 5, 2000.[3] D. Hughes, G. Coulson, J.Walkerdine, Free riding on Gnutella revisited: the bell

tolls? IEEE Distributed Systems Online 6 (2005) 1.[4] M. Karakaya, Ý. Körpeoglu, Ö. Ulusoy, Counteracting free riding in peer-to-peer

networks, Computer Networks 52 (2008) 675–694.[5] S.D. Kamvar, et al. The Eigentrust algorithm for reputationmanagement in P2P

networks, in: Presented at the 12th International Conference on World WideWeb, New York, USA, 2003.

[6] L. Xiong, L. Liu, PeerTrust: supporting reputation-based trust for peer-to-peer electronic communities, IEEE Transactions on Knowledge and DataEngineering 16 (2004).

[7] R. Zhou, K. Hwang, PowerTrust: a robust and scalable reputation system fortrusted peer-to-peer computing, IEEE Transactions on Parallel and DistributedSystems 18 (2007).

[8] A. Roberto, et al., Fuzzy techniques for trust and reputation managementin anonymous peer-to-peer systems, Journal of the American Society forInformation Science and Technology 57 (2006).

[9] K. Anagnostakis, M. Greenwald, Exchange-based incentive mechanismsfor peer-to-peer file sharing, in: Distributed Computing Systems, 2004.Proceedings. 24th International Conference on, 2004, pp. 524–533.

[10] D. Cabanillas, Peer-to-Peer bartering: swapping amongst self-interest agents,Ph.D. Thesis, Technical University of Catalonia, Barcelona, Spain, 2009.

[11] A. O’Sullivan, S.M. Sheffrin, Economic: Principles in Action, Pearson PrenticeHall, p. 243.

[12] B. Cohen, Abstract Incentives Build Robustness in BitTorrent. Technical Report,2003.

[13] C. Aperjis, M.J. Freedman, R. Johari, A Comparison of Bilateral and MultilateralExchange for Peer-Assisted Content Distribution, NET-COOP 2008 Paris,France, 2008.

[14] T. Bedrax-weiss, C. Mcgann, S. Ramakrishnan, Formalizing resources forplanning, in: Proceedings of the ICAPS-03 Workshop on PDDL, Trento, 2003.

[15] J.L. Gross, J. Yellen, Handbook of Graph Theory, CRC Press, 2004.[16] S. Song, K. Hwang, R. Zhou, Y. Kwok, Trusted P2P transactions with fuzzy

reputation aggregation, IEEE Internet Computing 9 (6) (2005) 24–34.[17] ProtoPeer (04/13/2011) [online]. Available: http://protopeer.epfl.ch/faq.html.

Kan Zhang is a Ph.D. student in the School of Computingat Derby University, UK. His research interests include in-centive mechanism in P2P systems, cloud computing andresource discovery mechanisms in distributed systems.

Nick Antonopoulos is currently the Head of School ofComputing and Assistant Dean (Research) of the Facultyof Business, Computing & Law at the University of Derby.He has published over 80 articles in fully refereed journalsand international conferences. He has received a numberof best paper awards in conferences and graduated 6Ph.D. students. He has edited two books in the field ofP2P, Grids and Cloud Computing published by IGI Globaland Springer respectively. He is on the editorial boardof the Springer journal of Peer-to-Peer Networking andApplications (effective from 2009) and on the advisory

editorial board of the IGI Global Handbook of Research on TelecommunicationsPlanning and Management for Business. He is a Fellow of the UK Higher EducationAcademy and a full member of the British Computer Society. His research interestsinclude emerging technologies such as large scale distributed systems and peer-to-peer networks, software agent architectures and security.