HAL Id: inria-00143790
https://hal.inria.fr/inria-00143790v2
Submitted on 2 May 2007
HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.
L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.
Acyclic Preference Systems in P2P Networks
Anh-Tuan Gai, Dmitry Lebedev, Fabien Mathieu, Fabien de Montgolfier, Julien Reynier, Laurent Viennot
To cite this version:
Anh-Tuan Gai, Dmitry Lebedev, Fabien Mathieu, Fabien de Montgolfier, Julien Reynier, et al..
Acyclic Preference Systems in P2P Networks. [Research Report] RR-6174, INRIA. 2007, pp.9. �inria- 00143790v2�
inria-00143790, version 2 - 2 May 2007
a p p o r t
d e r e c h e r c h e
ISSN0249-6399ISRNINRIA/RR--6174--FR+ENG
Thème COM
INSTITUT NATIONAL DE RECHERCHE EN INFORMATIQUE ET EN AUTOMATIQUE
Acyclic preference systems in P2P networks
Anh-Tuan Gai — Dmitry Lebedev — Fabien Mathieu — Fabien de Montgolfier — Julien Reynier — Laurent Viennot
N° 6174
April 2007
Unité de recherche INRIA Rocquencourt
Domaine de Voluceau, Rocquencourt, BP 105, 78153 Le Chesnay Cedex (France)
Téléphone : +33 1 39 63 55 11 — Télécopie : +33 1 39 63 53 30
Anh-Tuan Gai
∗
, DmitryLebedev
†
, Fabien Mathieu
†
, Fabien de Montgoler
‡
, Julien
Reynier
§
, Laurent Viennot
∗
ThèmeCOM Systèmesommuniants
ProjetsGyroweb
Rapportdereherhe n°6174April20079pages
Abstrat: Inthis work westudy preferenesystems naturalfor thePeer-to-Peer paradigm. Mostof them
fall in threeategories: global,symmetriand omplementary. Allthese systemsshareanayliityproperty.
As aonsequene,theyadmitastable(orPareto eient)onguration,where nopartiipantanollaborate
withbetterpartnersthantheirurrentones.
We analyze the representation of the suh preferene systems and show that any ayli system an be
represented with a symmetri mark matrix. This gives a method to merge ayli preferene systems and
retain theayliity. Wealsoonsider suh propertiesof theorrespondingollaborationgraph,aslustering
oeientanddiameter. Inpartiular,studyingtheexampleofpreferenesbasedonreallatenymeasurements,
weobservethatitsstableongurationisasmall-worldgraph.
Key-words: P2P, stable marriagetheory, rationalhoietheory, ollaborativesystems, BitTorrent,overlay
network,mathings, graphtheory
CRCMARDI
∗
INRIA,domainedeVolueaux,78153LeChesnayedex,Frane
†
FraneTeleomR&D,3840,ruedugénéralLeler,92130IssylesMoulineaux,Frane
‡
LIAFA,175,rueduChevaleret,75013ParisFrane
§
MotorolaLabs,ParlesAlgorithmes,SaintAubin,91193GifsurYvetteCedex,Frane
Résumé : Cet artileest onsaré àdes systèmes de préférenesnaturels dans lesréseaux pair-à-pair. La
plupartdeessystèmesappartiennentàl'unedestroislassesdepréférenessuivantes: globale,symétriqueet
omplémentaire. Cespréférenesontlapartiularitéd'êtreayliques. Enonséquene,ilspossèdentuneunique
ongurationstable(ausensdePareto),oùauunpartiipantnepeutollaboreravedemeilleurspartenaires
quesespartenairesourants.
En analysant leur représentation, nous montrons que tout système de préférenes ayliques peut être
représentéparunematriedenotessymétriques. Nousobtenonsainsiuneméthodepourfusionnerdessystèmes
de préférenes ayliquesen onservant lapropriété d'ayliité. Nous étudions également des propriétés du
graphe de ollaborationde la ongurationstable, omme le diamètre ou leoeient de lustering. Sur un
exampleréeldepréférenesbaséessurdesmesuresdelatenes,nousobservonsquelaongurationstableades
aratéristiquespetit-monde.
Mots-lés: pair-à-pair,mariagesstables,hoixrationnels,systèmesollaboratifs,BitTorrent,réseauxoverlay,
ouplages,graphes
1 Introdution
Motivation Inmosturrentpeer-to-peer (P2P)solutionspartiipantsareenouraged toooperatewith eah
other. Sine ollaborationsmay be ostly in terms of network resoures(onnetion establishment, resoure
onsumption, maintenane), the number of onnetions is often bounded by the protool. This onstraint
enourages thelientsto makeaareful hoie amongothers to obtainagood performanefrom thesystem.
The possibility to hoose abetter partner implies that there exists a preferene system, whih desribes the
interestsofeahpeer.
The study of suh preferene systems is the subjet of b-mathing theory. It has started forty-ve years
ago with the seminal work of Gale and Shapley on stable marriages [5℄. Although the original paperhad a
ertain rereational mathematis avor, the model turned out to be espeially valuable both in theory and
pratie. Today, b-mathing's appliations are notlimitedto datingagenies, but inlude ollege admissions, roommates attributions, assignment of graduating medial students to their rst hospital appointments, or
kidney exhanges programs [5, 6,7, 14℄. The goalof the present paper is to expand b-mathing appliation
domainto P2Pnetworksbyusingittomodeltheinterationsbetweenthelientsofsuhnetworks.
Previouswork In[10℄weoveredgeneralaspetsoftheb-mathingtheoryappliationtothedynamisofthe
nodeinterations. Weonsideredpreferene systemsnaturalfortheP2P paradigm,andshowedthat mostof
them fall into three ategories: global, symmetri,and omplementary. Wedemonstrated that these systems
share the sameproperty: ayliity. Weproved existeneand uniqueness ofastable ongurationfor ayli
preferenesystems.
Contribution Inthisartile,weanalyzethelinksbetweenpropertiesofloalmarksandtheprefereneliststhat
are generatedwith thosemarks. Weshowthat allaylisystemsanbe reatedwith symmetrimarks. We
provideamethodtomergeanytwoaylipreferenesystemsandretaintheayliproperty. Andnallyour
simulationsshowthat reallatenymarksreateollaborationgraphswithsmall-worldsproperties,in ontrast
withrandomsymmetriorglobalmarks.
Roadmap InSetion 2wedenethe global,symmetri, omplementary, andaylipreferene systems,and
provide a formal desription of our model. In Setion 3 we demonstrate that all ayli preferenes an be
representedusingsymmetripreferenes. WeonsideromplementarypreferenesinSetion4,andtheresults
areextended toanylinearombinationofglobalorsymmetrisystems. Setion 5disussesthepropertiesofa
stablesolutionprovidinganexamplebasedonMeridianprojetmeasurements[13℄. InSetion6wedisussthe
impatofourresults,and Setion7onludes.
2 Denition and appliations of P2P preferene systems
2.1 Denitions and general modeling assumptions
Weformalizehereab-mathingmodelforommonP2Ppreferenesystems.
Aeptane graph Peers may have a partial knowledge of the network and are not neessarily aware of all
other partiipatingnodes. Peers may also wantto avoid ollaborationwith ertain others. Suh riteriaare
represented byan aeptane graphG(V, E). Neighbors of a peer p∈ V are thenodes that mayollaborate
withp. AongurationCisasubsetC˜⊂E oftheexistingollaborationsatagiventime.
Marks We assumepeers use somerealmarks (likelateny, bandwidth,...) to ranktheirneighbors. This is
representedbyavaluedmatrixofmarksm={m(i, j)}. Apeer pusesm(p, i)andm(p, j)toompareiandj.
Withoutlossofgenerality,weassumethat0isthebestmarkandm(p, i)< m(p, j)ifandonlyifpprefersitoj.
Ifpisnotaneighborofq,thenm(p, q) =∞. Weassumeforonvenieneapeerphasadierentmarkforeahof
itsneighbors.Itimpliesthatapeeranalwaysomparetwoneighborsanddeidewhihonesuitsbettertohim.
Preferenesystem AmarkmatrixM reatesaninstaneLofapreferenesystem. L(p)isapreferenelistthat
indiateshowapeerpranksitsneighbors. Therelationwhenpprefersq1toq2isdenotedbyL(p, q1)< L(p, q2).
Note thatdierentmarkmatriesan produethesamepreferenesystem.
Global preferenes A preferenesystemisglobalifitanbededuedfromglobal marks(m(i, p) =m(j, p) = m(p)).
Symmetri preferenes A preferenes system is symmetri if it an be dedued from symmetri marks
(m(i, j) =m(j, i)foralli, j).
Complementary preferenes A preferenes systemis omplementary ifit anbededued from marks of the
form m(i, j) =v(j)−c(i, j),wherev(j)valuestheresourespossessedbyjandc(i, j)theresouresthatiand j haveinommon1.
Ayli preferenes A preferenessystemis ayliifitontainsnopreferene yle. Apreferene yleis a
yleofat leastthreepeers suhthat eaupeer stritlyprefersitssuessorto itspredeessoralongtheyle.
Quotas Eahpeerphasaquotab(p)(possiblyinnite)onthenumberoflinksitansupport. Ab-mathing is
aongurationCthatrespetsthequotas. Ifthequotasaregreaterthanthenumberofpossibleollaborations, thensimplyC=E wouldbeanoptimalsolutionforall.
Blokingpairs Weassumethatthenodesaimtoimprovetheirsituation,i.e. tolinktomostpreferredneighbors.
A pairofneighborspandq isabloking pair ofaongurationC if{p, q} ∈E\C andbothpreferto hange
theongurationC andtolinkwiththeeahother. Weassumethat systemevolvesbydisretesteps. Atany
step twonodes anbelinkedtogether if and only iftheyform ablokingpair. Those nodes may droptheir
worstperforminglinks tostaywithintheirquotas. AongurationC isstable ifnoblokingpairsexist.
Loving pair Peersp, qformalovingpairifpprefersqtoallitsotherneighborsandq,initsturn,preferspto
allotherneighbors.It impliesastronglink whihannotbedestroyedinthegivenpreferenesystem.
2.2 Preferene systems and appliation design
DependingontheP2Pappliation,severalimportantriterionanbeusedbyanodetohooseitsollaborators.
Weintroduethefollowingthree typesasrepresentativeofmostsituations:
Proximity: distanesinthephysialnetwork,inavirtualspaeorsimilaritiesaordingtosomeharateristis,
Capaity related: networkbandwidth,omputingapaity,storageapaity,
Distintion: omplementaryharaterofresouresownedbydierentpeers.
Notiethatthesestypesorrespondrespetivelytothedenitionsofsymmetri,globalandomplementary
preferenesystemategories.
Examples of symmetri preferenes are P2P appliations whih optimize latenies. A lassial approah
for distributed hash-table lists of ontatsis seletingthe ontats with the smallest round trip time (RTT)
in thephysial network. InPastry [15℄, a node will alwaysprefer ontats withsmallest RTT among all the
ontatsthat ant into agivenroutingtable entry. Moregenerally,building alowlateny overlaynetwork
with bounded degreerequires toselet neighbors withsmall RTTs. Optimizinglatenies betweenplayersan
alsoberuial,forinstane,foronlinereal-timegamingappliations[11℄. Suhpreferenesaresymmetrisine
themarkapeerpgivestosomepeerqisthesameasthemarkqgivestop(the RTTbetweenpandq).
Similarly,massivelymultiplayeronlinegames(MMOG)requireonnetingplayerswithnearbyoordinates
inavirtualspae[9,8℄. Againthisanbemodeledbysymmetripreferenesbasedonthedistaneinthevirtual
spae. Someauthorsalsoproposeto onnetpartiipantsofalesharingsystemaordingtothesimilarityof
theirinterests[3,16℄, whihis alsoasymmetrirelation.
BitTorrent[2℄isan exampleof aP2Pappliationthat usesaapaityrelated preferenesystem. Inbrief,
a BitTorrent peer uploads to peers it has most downloaded from during the last ten seonds. This is an
implementation of the well known Tit-for-Tat strategy. Themark of a peer an thus be seen hasits upload
apaitydividedbyitsollaborationquota.
ThisglobalpreferenenatureofBitTorrentshouldbetemperedbythefatthatonlypeerswithomplemen-
tarypartsoftheleareseleted. Pushingforwardthisrequirementwouldleadtoanotherseletionriterionfor
BitTorrent: prefereneforthepeerspossessingthemostomplementarysetoflepiees. Inotherwords,eah
1
Ofourse,inthisasethepreferredneighborhasalargermark.
peershouldtrytoexhangewithpeerspossessingalargenumberofbloksitneeds. Weallthisaomplemen-
tarypreferenesystem. Note,thatthiskindofprefereneshangesontinuouslyasnewpieesaredownloaded.
However,thepeerswiththemostomplementarysetofbloksarethose,whoenablelongestexhangesessions.
In its more generalform, the seletion of partners for ooperative le downloadan be seen as a mix of
severalglobal,symmetri,andomplementarypreferenesystems.
3 Ayli preferenes equivalene
In [10℄, we showed that global, symmetri and omplementary preferenes are ayli, and that any ayli
b-mathingprefereneinstanehasauniquestableonguration. Andaylisystemsalwaysonvergetoward theirstableonguration. However,sineayliityisnotdened byonstrution,oneanaskifotherkindof
aylipreferenesexist. Thissetionisdevotedtoanswerthisquestion.
Theorem1. LetP beaset ofn peers,Abethe setof allpossible aylipreferene instanesonP,S bethe
set of all possible symmetri preferene instanes on P,G bethe setof all possible global preferene instanes,
then
G$A=S
Therestofthissetiononsistsoftheproofoftheorem1: wewillrstshowS ⊂ AandG ⊂ A,thenA ⊂ S,
whihwillbefollowedbyG 6=A.
Lemma1. Global andsymmetri preferenesystems areayli
Proof. from [10 ℄ Let usassumetheontrary, andassumethat there isairular listof peers p1, . . . , pk (with
k ≥3),suh that eah peerof thelist stritly prefers itssuessorto itspredeessor. Written in theform of marksitmeansthatm(pi, pi+1)< m(pi, pi−1)forallimodulok. Takingasumforallpossiblei,weget
k
X
i=1
m(pi, pi+1)<
k
X
i=1
m(pi, pi−1).
Ifmarksareglobal,thisanberewritten
Pk
i=1m(pi)<Pk
i=1m(pi),andiftheyaresymmetri,Pk
i=1m(pi, pi+1)<
Pk
i=1m(pi, pi+1). Bothareimpossible,thusglobalandsymmetrimarksreateayliinstanes.
Thenextpart,A ⊂ S,usesthelovingpairsdesribedin 2.1. Werstprovetheexisteneoflovingpairsin
Lemma 2.
Lemma2. A nontrivialayliprefereneinstanealways admits atleast onelovingpair.
Proof. Aformalproofwaspresentedin[10℄. Inshort,ifthere isnolovingpair,oneanonstrutapreferene
ylebyonsideringasequeneofrsthoiesofpeers.
Algorithm1: Construtionof asymmetrinotematrixm givenanaylipreferenes instaneL onn
peers
N := 0
forallpandq,m(p, q) = +∞(bydefault, peersdonotaepteahother)
whilethereexistsaloving pair {a, b}do m(a, b) :=m(b, a) :=N
RemoveafromthepreferenelistL(b)andb fromL(a) N :=N+ 1
Lemma 3. Let L be a preferene instane. Algorithm 1 onstruts a symmetri mark matrix in O(n2) time
that produesL.
Proof. Thematrixoutput islearly symmetri. Neighboringpeers getnite marks,whileothers haveinnite
marks. If aninstane ontainsalovingpair {a, b} then m(a, b) = m(b, a)anbethebest marksineaand b
mutuallyprefertoanyotherpeers. AordingtoLemma 2suhalovingpairalwaysexistsinayliase. By
removingthepeersaandbfromtheirprefereneslists,weareleadtoasmallerayliinstanewiththesame
preferene listsexept aandb arenowunaeptableto eah other. Theproessontinuesuntilallpreferene
lists are eventually empty. The marks are given in inreasing order, therefore when m(p, q) and m(p, r) are
nite, m(p, q)< m(p, r)ithelovingpair{p, q} isformed before thelovingpair{p, r}ipprefersq tor.
ThealgorithmrunsinO(n2)timebeauseaniterationofthewhilelooptakesO(1)time. Alovingpairan
espeiallybefound in onstanttime bymaintainingalist onalllovingpairs. Thelistis updatedin onstant
timesine,afteraandbbeamemutuallyunaeptable,eahnewlovingpairontainseitheraanditsnewrst
hoie,orb anditsnewrsthoie.
All ayli preferenes are not global preferenes. A simpleounter-exampleuses 4 peers p1, p2, p3 and p4
withthefollowingpreferenelists:
L(p1) : p2, p3, p4 L(p2) : p1, p3, p4 L(p3) : p4, p1, p2 L(p4) : p3, p1, p2
Lis ayli,but p1 prefersp2 to p3 whereasp4 prefers p3 to p2. p1 andp4 ratep2 andp3 dierently,thus
theinstaneisnotglobal.
4 Complementary and Composite Preferene Systems
Complementary preferenes appear in systems where peers are equally interested in the resoures they do
not have yet. As said in Setion 2.1, omplementary preferenes an be dedued from marks of the form
m(p, q) =v(q)−c(p, q)(inthisase,marksofhighervaluesarepreferred).
Theexpressionofaomplementarymarkmatrixmshowsitisalinearombinationofpreviouslydisussed
global and symmetri markmatries: m =v−c, where v denes aglobal preferene system and c denes a
symmetrisystem.
Theorem2showsthatomplementarymarks,andmoregenerallyanylinearombinationofglobalorsym-
metrimarks,produeaylipreferenes.
Theorem2. Letm1 andm2 beglobal orsymmetri marks. Anylinearombinationofλm1+µm2 isayli.
Proof. The proofis pratiallythesameasforLemma 1. Letus suppose that thepreferenesystem indued
bym=λm1+µm2 ontainsaprefereneylep1, p2, . . . , pk, pk+1=p1,fork≥3. Weassumewlogthat m1is
global, m2 symmetriandthatmarksofhighervaluesarepreferredform. Then m(pi, pi+1)> m(pi, pi−1)for
allimodulok. Taking asumoverallpossiblei,weget
k
X
i=1
m(pi, pi+1)>
k
X
i=1
m(pi, pi−1) =
k
X
i=1
(λm1(pi, pi−1) +µm2(pi, pi−1)),but
k
X
i=1
(λm1(pi, pi−1) +µm2(pi, pi−1)) = λ
k
X
i=1
m1(pi−1) +µ
k
X
i=1
m2(pi−1, pi)
= λ
k
X
i=1
m1(pi+1) +µ
k
X
i=1
m2(pi, pi+1)
=
k
X
i=1
m(pi, pi+1).
This ontraditionprovestheTheorem.
Theorem 2 leads to the question whether any linearombination of ayli preferenes expressed by any
kindofmarksisalsoayli. Theexamplebellowillustratesthatingeneralitisnottrue:
M1=
0 3 1 2 0 1 3 1 0
,M2 =
0 1 2 1 0 3 1 2 0
,M1+M2=
0 4 3 3 0 4 4 3 0
The preferene instane induedby M1+M2 has theyle 1,2,3, while bothM1 and M2 are ayli(both
produeglobalpreferenes).