Exploring the Feasibility of Reputation Models for Improving P2P Routing under Churn

13
Exploring the Feasibility of Reputation Models for Improving P2P Routing under Churn Marc S` anchez-Artigas, Pedro Garc´ ıa-L´opez, and Blas Herrera Universitat Rovira i Virgili, Catalonia, Spain {marc.sanchez,pedro.garcia,blas.herrera}@urv.cat Abstract. Reputation mechanisms help peer-to-peer (P2P) networks to detect and avoid unreliable or uncooperative peers. Recently, it has been discussed that routing protocols can be improved by conditioning routing decisions to the past behavior of forwarding peers. However, churn — the continuous process of node arrival and departure — may severely hinder the applicability of rating mechanisms. In particular, short lifetimes mean that reputations are often generated from a small number of transactions. To examine how high rates of churn affect rating mechanisms, this pa- per introduces an analytical model to compute at which rate transactions has to be performed so that the generated reputations are sufficiently reliable. We then propose a new routing protocol for structured P2P systems that exploits reputation to improve the decision about which neighbor choose as next hop. Our results demonstrate that routing algo- rithms can extract substantial benefits from reputations even when peer lifetimes are short. 1 Introduction Resilience of structured Peer-to-Peer (P2P) networks under churn has attracted significant attention during the last few years. One of the fundamental problems of these systems is the ability to locate resources as peers join and fail at a high rate of churn. Churn may cause the staleness of immediate neighbors, and hence importantly deteriorate the performance of the underlying routing protocol. This has led to the development of reputation models such as the Feedback Forwarding Protocol (FFP) [1] and the model of Artigas et. al. [2] to detect reliable message forwarders. In these models, each peer captures evidence to quantify the behavior of its immediate neighbors. Based on this evidence, which corresponds to either success or failure of message delivery, each forwarder can evaluate whether it did a satisfactory routing job or not, and select as next hop the neighbor more likely to deliver the message. Unfortunately, yet, existing models suffer from the same syndrome they want to ameliorate. Since reputations assess trustworthiness using historical feedback, short peer lifetimes mean that reputation values may not be sufficiently accurate, This research was partially funded through project P2PGRID, TIN2007-68050-C03- 03, of the Ministry of Education and Science, Spain. H. Sips, D. Epema, and H.-X. Lin (Eds.): Euro-Par 2009, LNCS 5704, pp. 535–547, 2009. c Springer-Verlag Berlin Heidelberg 2009

Transcript of Exploring the Feasibility of Reputation Models for Improving P2P Routing under Churn

Exploring the Feasibility of Reputation Models

for Improving P2P Routing under Churn�

Marc Sanchez-Artigas, Pedro Garcıa-Lopez, and Blas Herrera

Universitat Rovira i Virgili, Catalonia, Spain{marc.sanchez,pedro.garcia,blas.herrera}@urv.cat

Abstract. Reputation mechanisms help peer-to-peer (P2P) networks todetect and avoid unreliable or uncooperative peers. Recently, it has beendiscussed that routing protocols can be improved by conditioning routingdecisions to the past behavior of forwarding peers. However, churn — thecontinuous process of node arrival and departure — may severely hinderthe applicability of rating mechanisms. In particular, short lifetimes meanthat reputations are often generated from a small number of transactions.

To examine how high rates of churn affect rating mechanisms, this pa-per introduces an analytical model to compute at which rate transactionshas to be performed so that the generated reputations are sufficientlyreliable. We then propose a new routing protocol for structured P2Psystems that exploits reputation to improve the decision about whichneighbor choose as next hop. Our results demonstrate that routing algo-rithms can extract substantial benefits from reputations even when peerlifetimes are short.

1 Introduction

Resilience of structured Peer-to-Peer (P2P) networks under churn has attractedsignificant attention during the last few years. One of the fundamental problemsof these systems is the ability to locate resources as peers join and fail at a highrate of churn. Churn may cause the staleness of immediate neighbors, and henceimportantly deteriorate the performance of the underlying routing protocol. Thishas led to the development of reputation models such as the Feedback ForwardingProtocol (FFP) [1] and the model of Artigas et. al. [2] to detect reliable messageforwarders. In these models, each peer captures evidence to quantify the behaviorof its immediate neighbors. Based on this evidence, which corresponds to eithersuccess or failure of message delivery, each forwarder can evaluate whether it dida satisfactory routing job or not, and select as next hop the neighbor more likelyto deliver the message.

Unfortunately, yet, existing models suffer from the same syndrome they wantto ameliorate. Since reputations assess trustworthiness using historical feedback,short peer lifetimes mean that reputation values may not be sufficiently accurate,

� This research was partially funded through project P2PGRID, TIN2007-68050-C03-03, of the Ministry of Education and Science, Spain.

H. Sips, D. Epema, and H.-X. Lin (Eds.): Euro-Par 2009, LNCS 5704, pp. 535–547, 2009.c© Springer-Verlag Berlin Heidelberg 2009

536 M. Sanchez-Artigas, P. Garcıa-Lopez, and B. Herrera

which will result in poor routing decisions and inconstant performance. One wayto address this problem was proposed by Swamynathan et. al. [3]. Through theuse of proactive reputations, they developed a mechanism for generating accuratereputations for newcomers and those peers with short lifetimes. Their idea was toallow peers to proactively initiate transactions for the mere purpose of generatingreliable ratings, and thus improve the overall quality of routing decisions.

While very promising, the proactive computation of ratings requires peers todetermine under which rate of churn reputations should be proactively generated.Otherwise, the additional traffic injected into the network might drain away thebenefits of a better routing service.

To examine this question, we make the following key contributions:

– We introduce an analytical model to derive at which rate feedback has to becollected in order to generate accurate reputations. Specifically, we considerthe distribution of residual neighbor lifetime, which plays a fundamental rolein the feasibility analysis throughout this work. With our model, we observethat depending on the tail-weight of the lifetime distribution, the probabilityof generating a reliable rating can be made arbitrarily large without incurringexcessive overhead.

– We propose a new routing protocol for structured P2P systems that exploitsreputation to improve the decision about which neighbor choose as next hop.We use a Bayesian reputation model, specifically a beta model, for reputationevolution. The main characteristic of our protocol is that progression throughthe identifier space is not completely greedy; instead, it selects next hop peersthat are presumably stable, though the average path length increases slightly.

The remaining of the paper proceeds as follows. In Section 2, we introduce themodel for studying the effects of churn. In Section 3, we provide some analyticalresults on the feasibility of reputations systems under churn. Section 4 describesour novel optimization technique. Simulations results are presented in Section 5.Finally, Section 6 discusses related work followed by the conclusions in Section 7.

2 System Model

In P2P networks, each peer creates links to other d peers when joining the system,where d may be a constant or a function of system size such as Chord [4]. Further,each peer detects and repairs link failures in order to stay connected. Under somegeneral conditions [5], link dynamics can be represented as an ON/OFF process.Specifically, a link is ON whenever the adjacent neighbor to the link is alive, andOFF, when it has departed and its failure is in the process of being detected andrepaired.

In some P2P networks, specially unstructured systems, links do no switch toother peers during ON time (i.e., remain connected to the same neighbors untilthey fail). Then, link durations are simply residual lifetimes of original neighbors.In structured P2P networks, however, this assumption does not usually hold. Forexample, deterministic DHTs (e.g. Chord) actively switch links to new neighbors

Exploring the Feasibility of Reputation Models 537

before the adjacent ones leave the system. For instance, in Chord, a switch occurswhen a joining peer takes ownership of a link by becoming the new successor ofthe corresponding neighbor pointer.

In this paper, we assume that links do not switch before the current neighborsfail. The reason is quite subtle. In general, a link switch requires recomputing thereputation associated with that link, since very often there is no prior knowledgeabout the new neighbor. In practice this increases the odds of short-term ratings,for which there is no compelling reason to allow peers to switch between live linksother than preserving the original routing properties, on the average path lengthprincipally. In DHTs such as Pastry, Tapestry or Kademlia, this assumption hasno negative repercussions. In Chord, the adoption of this assumption randomizesrouting, for we see no sufficient reason to actively switch links to new neighbors.

For the churn model, we adopt the model of Leonard et. al. [5]. More precisely,we consider that each joining peer is assigned a random lifetime drawn from somedistribution F (t), which reflects the amount of time the peer stays in the system.Since it is almost impossible for a newcomer to pick its neighbors such that theirarrival times are exactly the same as herself, neighbor selection is performed overthe peers already present in the network. These nodes have been online for somerandom amount of time, which means that residual lifetime has to be considered.

We now formalize the notion of residual lifetime. Let Ri denote the remaininglifetime of neighbor i when the newcomer joined the system. Assuming that thesystem has reached stationarity (i.e., peers joining the system at different timesof the day or month have their lifetimes drawn from the same distribution F (t)),the cumulative density function (CDF) of residual lifetime is given by [6]:

FR(t) = Pr(Ri < t) =1

E[Li]

∫ t

0

(1 − F (z))dz (1)

where F (t) is the CDF of neighbor’s i lifetime Li, and E[Li] its expectation. Asin [5], we will experiment with two lifetime distributions:

– Exponential lifetime, which has been observed in PlanetLab, with the CDFgiven by F (t) = 1 − e−λt, λ > 0; and

– Pareto lifetime, which has been reported by several works (see [7] for details)to provide a tight fit to the lifetime distributions found in real P2P systems.Its CDF is F (t) = 1− (1+ t

β )−α, α > 1, where α represents the heavy-taileddegree and β is a scaling parameter.

For exponential lifetimes, the residual lifetimes are also exponential thanks tothe memoryless property of F (t), i.e., FR(t) = 1 − e−λt. However, for Paretolifetimes, the residuals are more heavy-tailed and exhibit shape parameter α−1,i.e., FR(t) = 1 − (1 + t

β )1−α, α > 1.Another assumption is as follows. While online, we consider that the number

of transactions issued for each neighbor i follows a homogeneous Poisson processwith rate μi. This implies that the probability that exactly x transactions occurin time interval (0, t] can be written as

Pr(Xi(t) = x|μi) =(μit)xe−μit

x!, x = 0, 1, 2, . . . (2)

538 M. Sanchez-Artigas, P. Garcıa-Lopez, and B. Herrera

Since the sum of independent Poisson processes is again a Poisson process, thentotal number of transactions, X =

∑di=1 Xi, is a Poisson process with rate equal

to μ =∑d

i=1 μi. Finally, we should mention that the above assumption does nothold when the transaction rate changes over time. This is especially visible whenreputations are applied to routing. Since the computation of reputations is madebased on the success or failure of message delivery, reliable neighbors will receivemore messages to transmit. This implies that the transaction rate of all neighborswill vary over time. More precisely, the transaction rate of neighbor i will be equalto Λi(t) =

∫ t

0μi(z)dz, making the Poisson process non-homogeneous. However,

since all non-homogeneous Poisson processes can be reduced to the homogeneouscase, we only considered homogeneity to keep the derivations tractable.

3 Feasibility Analysis

In this section, we focus on the probability that a reliable reputation can be builtbefore the corresponding neighbor leaves the system. We call this probability theprobability of feasibility π. In our analysis, a reputation is said to be reliable whenthe level of confidence in its value is sufficiently high. In practice, this means thatthe minimum number of interactions, say m, over which it makes sense to assumestationary behavior has occurred.

More formally, consider the ith neighbor of an arbitrary node in the network.Its reputation is reliable only if the number of messages Xi(tOFF ) routed throughi is greater than m before it decides to abandon the system at time tOFF . Then,

πi =∫ ∞

0

Pr(Xi(z) ≥ m)fR(z)dz (3)

where fR(z) is the the probability density function (PDF) of the residual lifetime.

Theorem 1. For exponential lifetimes,

πi =(

μi

μi + λ

)m

(4)

and for Pareto lifetimes with α > 1:

πi = 1 + eμiβ (1 − α)m−1∑ω=0

μωi

ω!βωG(ω, μi, α, β) (5)

where G(ω, μi, α, β) =ω∑

n=0(−1)ω−n (

ωn

)(μiβ)α−n−1 Γ (1 − α + n, μiβ).

Proof. For exponential lifetimes, we have:

πi =∫ ∞

0

( ∞∑ω=m

(μix)ωe−μix

ω!

)λe−λxdx

Exploring the Feasibility of Reputation Models 539

= λ∞∑

ω=m

(μi)ω

∫ ∞

0

xωe−(μi+λ)x

ω!dx

= λ

∞∑ω=m

(μi)ω

(μi + λ)ω+1

∫ ∞

0

(μi + λ)ω+1xωe−(μi+λ)x

ω!dx (6)

Now noting that the integrand in (6) is an Erlang-(ω + 1) PDF,

πi = λ

∞∑ω=m

(μi)ω

(μi + λ)ω+1=

λ

(μi + λ)

∞∑ω=m

(μi

μi + λ

=(

μi

μi + λ

)m

(7)

For Pareto lifetimes, we have:

πi =∫ ∞

0

(1 −

m−1∑ω=0

(μix)ω e−μix

ω!

)− (1 − α)

β

(1 +

x

β

)−α

dx =

= − (1 − α) βα−1

∫ ∞

0

(β + x)−α dx+

+ (1 − α) βα−1m−1∑ω=0

μωi

ω!

∫ ∞

0

xωe−μix (β + x)−αdx

We note that α > 1, β > 0 and − (1 − α)βα−1∫ ∞0 (β + x)−α

dx = 1, then

πi = 1 + (1 − α)βα−1m−1∑ω=0

μωi

ω!

∫ ∞

0

xωe−μix (β + x)−α dx =

= 1 + (1 − α)βα−1m−1∑ω=0

μωi

ω!1

βα

∫ ∞

0

xω(1 + x

β

)α e−μixdx

By the change of variable 1 + xβ = t, we have

πi = 1 + (1 − α)βα−1m−1∑ω=0

μωi

ω!eμiββω−α+1

∫ ∞

1

(t − 1)ω

tαe−μiβtdt

We simplify and we use the binomial identity of Newton

πi = 1 + eμiβ (1 − α)m−1∑ω=0

μωi

ω!βω

∫ ∞

1

ω∑n=0

(ωn

)tn (−1)ω−n

tαe−μiβtdt =

= 1 + eμiβ (1 − α)m−1∑ω=0

μωi

ω!βω

∫ ∞

1

e−μiβt

(ω∑

n=0

n

)tn−α (−1)ω−n

)dt =

540 M. Sanchez-Artigas, P. Garcıa-Lopez, and B. Herrera

0 120 240 360 4800

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

μi (number of transactions/hour)

π i

Pareto simulations (m = 20)Pareto model (m = 20)Pareto simulations (m = 40)Pareto model (m = 40)Expo simulations (m = 20)Expo model (m = 20)Expo simulations (m = 40)Expo model (m = 40)

Fig. 1. Comparison of probability πi fromTheorem 1 to simulation results as rate μi

varies

0 50 100 150 2000.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

a + b

γ a, b

1 <= a <= 199, b = 1a = 10, 1 <= b<= 190a = 15, 1 <= b <= 185a = 20, 1 <= b <= 180

Fig. 2. Confidence (see eq. (8)) versus thenumber of observations.

The finite series commutes with the integral

πi = 1 + eμiβ (1 − α)m−1∑ω=0

μωi

ω!βω

ω∑n=0

(−1)ω−n

n

) ∫ ∞

1

tn−αe−μiβtdt =

= 1 + eμiβ (1 − α)m−1∑ω=0

μωi

ω!βω

ω∑n=0

(−1)ω−n

n

) ∫ ∞

1

e−μiβt

tα−ndt

The generalized exponential integral function, En, is related with the incompletegamma function, with x > 0, in the following way:

∫ ∞1

e−xt

ta dt = xa−1Γ (1 − a, x).Since μiβ > 0, we finally have πi = 1 + eμiβ (1 − α)

∑m−1ω=0

μωi

ω! βωG(ω, μi, α, β).

��From Theorem 1, it is easy to obtain the values of μi which make πi to be withina small window [ε, 1], where ε is a small fraction of error. More exactly, by solvinginequality πi(μi, m) =

∫ ∞0

(∑∞ω=m

(μiz)ωe−μiz

ω!

)fR(z)dz ≥ ε for variable μi, one

can easily write the feasibility condition for the reputation system, and determineif the normal execution of the application is sufficient to generate reliable ratings.One immediate corollary of Theorem 1 is thus:

Corollary 1. For exponential lifetimes, the feasibility condition is μi ≥ −ε1m λ

(ε1m −1)

,

where 1−ε is the tolerance level for the fraction of reliable ratings in the system.

For the Pareto part of Theorem 1, there is no closed-form solution for πi. Totackle this problem, inequality πi = 1+eμiβ (1 − α)

∑m−1ω=0

μωi

ω! βωG(ω, μi, α, β) ≥

ε can be numerically solved using the Regula Falsi method 1 , with G(ω, μi, α, β)defined as Theorem 1.

The accuracy of eqs. (4)-(5) is illustrated in Figure 1, which plots πi for foursimulations together with those predicted by us. As done in [5], parameters α and1 Faster numerical methods such as Newton-Rhapson exhibit convergence failures.

Exploring the Feasibility of Reputation Models 541

λ has been selected so that E[Li] is 0.5 hours for both lifetime distributions. Thescaling parameter β has been set to 1 in the Pareto distribution. For simulations,we used a hypothetical system with N = 1, 000 peers and degree d = 10, in whicheach failed peer was immediately replaced by a fresh peer. As shown in the figure,simulations agree with predicted results very well.

4 The Reliable Forwarder (RF) Scheme

In this section, we examine a mechanism to optimize routing paths. Our goal is tooptimize routing paths so that peers collectively select the routes that are likelyto successfully deliver messages. This mechanism, named the Reliable Forwarder(RF) scheme, proposes a reputation system based on the Beta reputation modelto tolerate churn in a fully distributed manner. It is important to note here thatthe objective of this research is not to propose the optimal routing protocol butrather to provide an experimental study on what can be achieved in DHTs, fromthe reputation viewpoint.

Overview. Although the RF scheme is applicable to almost all structured P2Pnetworks, we employ Chord [4] for illustration purposes. In this work, we assumethat the reader is familiar with Chord. Following convention, we will indistinctlyrefer to a peer and the identifier of a peer by p. The intuition of the protocol is asfollows: in the original proposal, Chord greedily routes towards the destination indecreasing distances. However, this order is in no way essential to the correctnessof routing. This provides some room for selecting stable peers on delivery paths.Specifically, the idea is to loosen the rule of strictly selecting the neighbor closestto the destination in the following way:

Assume that the remaining distance from p to the destination is dp. Let j(p)be the index of p ’s neighbor that most closely precedes the destination, i.e., j(p)is the largest integer verifying that 2j(p)+h ≤ dp. Under our scheme, p considersthe j(p) neighbors in increasing order of distance w.r.t. the destination until oneneighbor is picked randomly. The election is done in proportion to its reputation,as its reputation value captures how well this neighbor forwards messages.

As expected, reputations are built by injecting new messages into the system,and tracking continuously the feedback received for each message. Obviously,this process re-adjusts the paths and ameliorates the effects of churn.

Feedback. To collect evidence to asseverate either success or failure of messagedelivery, we make use of the Forward Feedback Protocol (FFP) introduced in [1].In this protocol, each routed message is followed on its routing path by a feedbackmessage. A transaction is always initiated by the source by sending out a messagefor some (random) key, which in addition starts a timeout. Thus, after a timeoutor a response, the source obtains a feedback that can use to notify each peer alongthe routing path about the success or failure of message delivery. More precisely,the first feedback message is sent immediately by the source upon receptionof a response. Then on, the feedback is forwarded following exactly the samerouting path the original message followed. With this feedback, each intermediate

542 M. Sanchez-Artigas, P. Garcıa-Lopez, and B. Herrera

router along the path can learn whether it did a good job or not, and feed thereputation system with valuable information. The use of FFP was motivated bytwo reasons:

– Fast convergence: since observations are shared with the peers along routingpaths, the system can converge to a state in which there are few lost messagesfaster than when a peer produces the reputations for its neighbors exclusivelyon its own. Of course, we assume that peers are honest and cooperative.

– Low overhead: the benefits of such a fast convergence comes only at the priceof doubling the routing cost; thus the overhead is O(log n) messages.

Representation and Calculation (Beta Reputation Model [8]). Concretely, eachpeer characterizes the behavior of its neighbor i as follows. It considers thatthere is a parameter θ such that neighbor i is capable of finding a reliable routingpath with probability θ. The parameter θ is unknown, and each peer models thisuncertainty by assuming that θ itself is drawn according to a distribution, calledthe prior distribution, which is updated with each new transaction. In Bayesiananalysis, the distribution Beta(a, b) is commonly selected as a prior distributionfor random variables that take on real values in the interval [0, 1]. For this reasonwe use distribution Beta(a, b) in our model.

The standard Bayesian procedure is as follows. Initially, the prior is Beta(1, 1),i.e., the uniform distribution on [0, 1]; this represents absence of knowledge aboutthe possible values for θ. Then, when s+f transactions are performed, say with ssuccessful deliveries and f failures, the prior is updated according to expressionsa = a+s and b = b+f . If θ, the true unknown parameter, is constant, then aftera sufficient number of transactions, a ≈ θn, b ≈ (1−θ)n, and Beta(a, b) becomesclose to a Dirac at θ. The advantage of using the Beta distribution is that it onlyrequires two parameters that are continuously updated as new transactions aremade. Under this model, we compute reputations as follows:

Definition 1. Consider a peer p with d neighbors. Under the standard BayesianBeta model, we define the reputation T i

a,b of neighbor i at a time t as the expectedvalue of the Beta(a, b), where a+b is the total number of transactions made withneighbor i up to time t. Formally, T i

a,b = E[Beta(a, b)] = aa+b .

Notice that our definition of reputation not only includes first-hand information,i.e., the feedback corresponding to the transactions started individually by p, butalso the opinions of other online peers in the system. More precisely, their opinionis captured by increasing either parameter a or b depending on the feedback sentby the source peer through the FFP (see preceding section for details).

On its own, T ia,b does not distinguish between the cases where a link is reliable

from the cases where it is not. This uncertainty raises the necessity to accuratelygauge the confidence in T i

a,b to avoid making hasty decisions, for which we definea confidence metric, γa,b, as the posterior probability that the current value of θlies within an acceptable level of error ε about T i

a,b. For instance, if the numberof transactions is constant, a larger value of ε causes a node to be more confident

Exploring the Feasibility of Reputation Models 543

in its T ia,b than a lower value of ε. The first part of eq. (8) comes from the work

of Teacy et. al. in [9].

γia,b =

∫ T ia,b+ε

T ia,b−ε

θa−1(1 − θ)b−1dθ∫ 1

0 ta−1(1 − t)b−1dt= IT i

a,b+ε(a, b) − IT ia,b−ε(a, b) (8)

where Ix(α, β) is the regularized incomplete beta function. Figure 2 illustrateshow confidence grows when the number of transactions increases, for differentvalues of the parameters a and b of the Beta distribution.

In the last section, we examined how the transaction rate affects the reliabilityof ratings. For the case of the Beta reputation model, γi

a,b can be used to calculatethe threshold on the number of transactions. However, since an exact expressionof eq. (8) is hard to develop in closed-form (it depends on T i

a,b), we have optedhere to set a threshold γ on γi

a,b directly. Specifically, γ represents the minimumlevel of confidence to consider T i

a,b as a reliable reputation. Figure 3 illustratesthe relationship between parameters m and θ for 4 combinations of γ and ε. Asseen in the figure, a small increase in ε results in a sharp increase in m.

4.1 Routing-Decision Process

With the confidence metric, the decision-making process works as follows. First,the posterior is calculated based on all the available knowledge. For each neighbori, this is achieved by updating T i

a,b and γia,b as explained above. Then, each router

p takes a decision in the following way:

1. Peer p considers up to j(p) alternatives to forward the message, where j(p)is the index of the neighbor that most closely precedes the destination.

2. If neighbor j(p) is the destination, then the decision-making process stops.3. Otherwise, p begins with neighbor j(p) and performs a Bernoulli trial, Xj(p),

that equals 1 (Xj(p) = 1 means a success) with probability

wp

j(p) = Pr(Xj(p) = 1) = Tj(p)a,b

j(p)a,b

γ , if γj(p)a,b < γ

1 otherwise(9)

where γ is the minimum level of confidence to deem Tj(p)a,b reliable. Intuition of

this formula is as follows. In the preceding section we derived an expression tocompute the confidence on a reputation. Because an optimal routing decisionis not the election of a neighbor only in proportion to its reputation but alsoon how reliable the reputation is, (9) includes a linear drop-off in reliability,so that neighbors with reliable ratings are more likely to be selected.

4. If trial Xj(p) = 0 (fails), then steps 2−3 are repeated for neighbor i = j(p)−1.If this trial fails, steps 2−3 are again repeated but for neighbor i = j(p)−2.This is repeated until some trial is successful.

5. If eventually i = 0, then the jump is always performed. Note that this jumpcorresponds to the immediate successor of p on the identifier space.

544 M. Sanchez-Artigas, P. Garcıa-Lopez, and B. Herrera

0 0.2 0.4 0.6 0.8 10

50

100

150

200

250

300

350

400

θ

m

ε = 0.05, γ = 0.8ε = 0.1, γ = 0.8ε = 0.05, γ = 0.9ε = 0.1, γ = 0.9

Fig. 3. Relationship between m and θ

0 750 1500 2250 3000 3750 4500

0.2

0.3

0.4

0.5

0.6

0.7

0.8

Time (seconds)

Mea

sure

d P

roba

bilit

y

RF over Chord − Prob. of feasibility πRF over Chord − Prob. of routing success Chord − Prob. of routing success

Fig. 4. Performance of the RF schemeas a function of time (1/μ = 30 seconds)

30 60 120 240 4800

0.1

0.2

0.3

0.4

0.5

1/μ (seconds)

Mea

sure

d P

roba

bilit

y

RF over Chord − Prob. of feasibility πRF over Chord − Prob. of routing success

Chord − Prob. of routing success

Fig. 5. Performance of the RF schemefor exponential lifetimes (λ = 2)

30 60 120 240 4800

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

1/μ (seconds)

Mea

sure

d P

roba

bilit

yRF over Chord − Prob. of feasibility πRF over Chord − Prob. of routing success

Chord − Prob. of routing success

Fig. 6. Performance of the RF schemefor Pareto lifetimes (α = 2; β = 1)

Notice that probabilities wpi are the only state each peer has to maintain for

churn-aware routing. It grows O(log n) per peer, scaling well with the numberof peers in the network.

Example 1. We focus on the hypothetical case that j(p) = 2. As explained above,this means that the RF scheme starts with neighbor j(p) = 2, which correspondsto a jump of length at least 4 on the Chord circle. This neighbor is selected withprobability w

p2. If not possible, then p tries to choose neighbor 1 with probability

(1−wp2)w

p1. Finally, it will consider neighbor 0 (successor of p ) if neither neighbor

2 nor neighbor 1 are chosen. This neighbor is always chosen to guarantee progresstowards the destination.

5 Simulated Performance Results

In this section, we concisely describe the simulation environment followed by theperformance evaluation of our scheme in various scenarios.

Exploring the Feasibility of Reputation Models 545

5.1 Simulator and Environment

We designed an event-driven simulator with the Chord and our scheme2. Initially,we constructed a Chord network consisting of n = 1, 000 peers3. Each peer livedfor a random duration Li and then left ungracefully (without notifying others).In consequence, delivery failures were caused by peer departures. To repair thefailures, we considered that all peers periodically invoked functions stabilize()and fix fingers(). Each call to fix fingers() updated a single neighbor. Theperiod Tfix between two successive calls to fix fingers() was set to Tfix = 15seconds.

To prevent the network from depleting to zero, we assumed that when a livepeer departed it was immediately replaced by a fresh peer with random lifetimeLi; the exact arrival process was not essential and had no impact on the results.The two lifetime distributions discussed in this paper were tested. Specifically,parameters α and λ were selected so that E[Li] = 0.5 hours for both distributionsand the scaling parameter β was set to 1 in the Pareto F (t).

In addition, we assumed that all live peers injected messages into the networkaccording to a Poisson process with rate μ. Since the rate of successful messagedelivery is our focus, the simulator did not model real features such as networkdelay. As a result, we assumed the latency incurred by each hop to be uniformlydistributed between [100, 200] milliseconds. Regarding rating parameters, we setγ and ε to 0.8 and 0.1, respectively.

5.2 Experiments

To assess how the value of μ affects the performance of the RF scheme, we ranseveral simulations varying this parameter.

Figures 5 and 6 show the probability of successfully routing a message alongwith the mean fraction of reliable reputations. It can be clearly inferred that ourscheme improves considerably the tolerance of standard Chord against churn. Inthe Pareto case (Figure 6), for instance, with an average waiting time betweenmessage arrivals of 1

μ = 30 seconds, our scheme doubles the fraction of successfuldeliveries. Similar observations can be made in the exponential case (Figure 5).Compared with the Pareto case, the exponential case exhibits a larger numberof unsuccessful message deliveries. (1) helps us to understand why. According tothis expression, the residual exponential distribution remains exponential, whilethe Pareto case becomes more heavy-tailed and indeed exhibits shape parameterα−1 = 2. Since the fraction of long-lived peer is higher in the Pareto, our schemecan thus more easily discover reliable routing paths. Even when 1/μ is high, ourscheme is able to improve Chord.

Another interesting insight is that although there exits a direct relationshipbetween π and the proportion of successful deliveries, such a relationship is notlinear. This means that our scheme is able to deliver messages in the case that

2 We built a lightweight version of PlanetSim (http://www.planetsim.net/) in Python.3 The network size was limited to 1, 000 due to high computational cost of simulations.

546 M. Sanchez-Artigas, P. Garcıa-Lopez, and B. Herrera

reputations are not sufficiently reliable. Figure 4 shows how these two parametersevolve over time. As can be seen in the figure, the slope of the π line is less abruptat the beginning, which suggests that calculating reliable ratings is more costlythan improving routing under a Bayesian framework.

6 Related Work

To mitigate the impacts of churn, a number of solutions have been proposed. In[10], Rhea et. al. proposed to handle churn by reactive or periodic failure recovery,accurate calculation of routing timeouts and proximity neighbor selection. Later,Dabek et al. [11] explored a wide range of solutions, which included iterative andrecursive routing, replication and erasure coding, in their implementation of theDHash system. Another example is [12], where Krishnamurthy et al. analyzed theperformance of Chord under churn by using a master-equation-based approach.Our work differs in that we consider distributed rating mechanisms as a substrateto help routing schemes to better handle churn. The unique works we are awareof that attempt to collectively optimize routing paths are those from Galuba et.al. [1] and Artigas et. al. [2], but they do not consider the way that churn affectsthe feasibility of their solutions; rather, they mainly focus on the problem of howto minimize message dropping by node selection.

Finally, we should mention the work of Marti et. al. [13]. Their idea was to usean external social network to improve the rate of delivered messages. Each peersent its messages through the nodes it knew personally or were friends of friends.So, they implicitly were the first to improve the quality of paths. Compared withus, their system depends on data (social links) that may not be always available.

7 Conclusions

In this paper, we have explored how high rates of churn affect rating mechanisms.We have provided analytical expressions to appraise the feasibility of distributedratings systems as one way to improve message delivery in peer-to-peer networks.

Furthermore, we have introduced a novel scheme to optimize route selection.The scheme chooses reliable forwarders based on a Bayesian reputation approach.It is fully distributed and no agreement is necessary. Our early simulation resultsreport promising benefits of reputation, although it cannot be assumed in generalthat reputations are reliable.

References

1. Galuba, W., et al.: Authentication-free fault-tolerant peer-to-peer service provi-sioning. In: DBISP2P 2007. Springer, Heidelberg (2007)

2. Sanchez-Artigas, M., Garcıa-Lopez, P., Skarmeta, A.F.G.: Secure forwarding indHTs - is redundancy the key to robustness? In: Luque, E., Margalef, T., Benıtez,D. (eds.) Euro-Par 2008. LNCS, vol. 5168, pp. 611–621. Springer, Heidelberg (2008)

Exploring the Feasibility of Reputation Models 547

3. Swamynathan, G., et al.: Exploring the feasibility of proactive reputations. Con-currency and Computation: Practice and Experience 20(2), 155–166 (2008)

4. Stoica, I., et al.: Chord: a scalable peer-to-peer lookup protocol for internet appli-cations. IEEE/ACM Trans. Netw. 11(1), 17–32 (2003)

5. Leonard, D., Rai, V., Loguinov, D.: On lifetime-based node failure and stochasticresilience of decentralized peer-to-peer networks. In: ACM SIGMETRICS, pp. 26–37 (2005)

6. Prabhu, N.: Stochastic Processes; Basic Theory and its Applications. Macmillan,New York (1965)

7. Sen, S., Wang, J.: Analyzing peer-to-peer traffic across large networks. IEEE/ACMTrans. Netw. 12(2), 155–166 (2004)

8. Jøsang, A., Ismail, R.: The beta reputation system. In: 15th Bled Electronic Com-merce Conference e-Reality: Constructing the e-Economy (2002)

9. Teacy, W., et al.: Coping with inaccurate reputation sources: experimental analysisof a probabilistic trust model. In: AAMAS 2005, pp. 997–1004. ACM, New York(2005)

10. Rhea, S., et al.: Handling churn in dhts. In: USENIX Annual Technical Conference(2004)

11. Dabek, F., et al.: Designing a dht for low latency and high throughput. In: NSDI2004, pp. 85–98 (2004)

12. Krishnamurthy, S., et al.: A statistical theory of chord under churn. In: PDP 2008,pp. 473–482 (2008)

13. Marti, S., Ganesan, P., Garcia-Molina, H.: DHT routing using social links. In:Voelker, G.M., Shenker, S. (eds.) IPTPS 2004. LNCS, vol. 3279, pp. 100–111.Springer, Heidelberg (2005)