CollectCast:APeer-to-PeerServiceforMediaStreamingMohamedHefeedaaAhsanHabibbDongyanXuaBharatBhargavaaBoyanBotevaaDepartmentofComputerSciencesbSchoolofInformationandManagementSystemsPurdueUniversity,WestLafayetteUniversityofCalifornia,Berkeleyfmhefeeda,dxu,bb,botevg@cs.purdue.eduhabib@sims.berkeley.eduAbstractWepresentthedesign,implementation,andevaluationofanovelP2PservicecalledCollectCast.Col-lectCastoperatesentirelyattheapplicationlevelbutinfersandexploitspropertiesoftheunderlyingnetwork.ThemajorpropertiesofCollectCastincludethefollowing:(1)itinfersandleveragestheunderlyingnet-worktopologyandperformanceinformationfortheselectionofsenders;(2)itmonitorsthestatusofpeersandconnectionsandreactstopeer/connectionfailureordegradationwithlowoverhead;(3)itdynamicallyswitchesactivesendersandstandbysenders,sothatthecollectivenetworkperformanceoutoftheactivesendersremainssatisfactory.Weperformbothreal-worldmeasurementsandsimulationsofCollectCast.OursimulationresultsshowthatCollectCast-basedP2PstreamingachievesbetterperformancethanP2Pstream-ingbasedonlyonend-to-endnetworkperformanceinformation.Thereal-worldmeasurementsareobtainedbyimplementingaP2Pmediastreamingsystem(calledPROMISE)ontopofCollectCast.WehaveinstalledandtestedPROMISEonthePlanetLabtestbed.Theresultsofthepacket-levelandframe-levelperformanceobtainedfromstreamingseveralMPEG-4moviesdemonstratethepotentialbenefitsfortheapplicationsbuiltontopofCollectCast.1IntroductionPeer-to-peer(orP2P)systemshavegainedtremendousmomentuminrecentyears.InaP2Psystem,peerscommunicatedirectlywitheachotherforthesharingandexchangeofdataaswellasotherresourcessuchasstorageandCPUcapacity.ParallelingresearchinotheraspectsofP2P,suchaslookup[27,34,30],storage[12,31],andmulticast[9,1,36],weinthispaperfocusonP2Preal-timemediastreaming.DifferentfromgeneralP2Pfilesharing,P2Pmediastreamingposesmorestringentresourcerequirementsforreal-timemediadatatransmission.However,asfirstaddressedinourearlierwork[37],foramediafileofplaybackrateR0,asinglesendingpeermaynotbeableorwillingtocontributeanoutboundbandwidthofR0.Moreover,downloadingtheentiremediafilebeforeplaybackisnotthebestsolution,duetothepotentiallylargemediafilesizeandthuslong1downloadtime.Asoursolution,weproposeaP2Pmediastreamingmodelthatinvolvesmultiplesendingpeersinonestreamingsession.Despiterecentresearchresultsofoursandothers,anumberofchallengesintrinsicinP2Pmediastreaminghavenotbeenaddressed.Inthispaper,wepresentoursolutiontothefollowingchallenge:inahighlydiverseanddynamicP2Pnetwork,howtoselect,monitorandpossiblyswitchsendingpeersforeachP2Pstreamingsession,sothatthebestpossiblestreamingqualitycanbemaintained?Thedynamicsanddiversityarereflectedinbothpeersandnetworkconnectionsbetweenpeers:(1)asendermaystopcontributingtoaP2Pstreamingsessionatanytime,(2)theoutboundbandwidthcontributedbyasendermaychange,(3)theconnectionbetweenasenderandthereceivermayexhibitdifferentend-to-endbandwidth,loss,andfailurerate,andmoreimportantly(4)theunderlyingnetworktopologydeterminesthattheconnectionsbetweenthesendersandthereceiverarenotindependentofeachother,withrespecttotheirlossandfailurerate.Asaresult,thequalityofaP2Pstreamingsessiondependsonjudiciousselectionofsenders,constantmonitoringofsender/networkstatus,andtimelyswitchingofsenderswhenthesenderornetworkfailsorseriouslydegrades.Unfortunately,previousworksinP2Pmediastreamingdonotprovideasystematicsolutiontotheabovechallenge.Forexample,somepreviousworkssimplyassumethatareceiverreceivesmediadatafromonlyonesender[2,36,9].Fortheworksthatdoassumemultiplesendersforonereceiver[20,24],thereisnostudyontheselectionofthebestsenders.Inthispaper,wepresentthedesign,implementation,andevaluationofanovelP2PservicecalledCol-lectCast.CollectCastoperatesentirelyattheapplicationlevelbutinfersandexploitsproperties(topologyandperformance)oftheunderlyingnetwork.CollectCasthasapatternof“onereceivercollectingdatafrommul-tiplesenders”.Unlikeothermultiple-to-onenetworkservicessuchasconcast[6],eachCollectCastsessioninvolvestwosetsofsenders:thestandbysendersandtheactivesenders.Membersofthetwosetsmaychangedynamicallyduringthesession.CollectCastreflectstheP2Pphilosophyofdynamicallyandopportunisticallyaggregatingthelimitedcapacityofpeerstoperformatask(streaming)traditionallyperformedbyadedicatedentity(amediaserver).ThemajorpropertiesofCollectCastincludethefollowing:(1)itinfersandleveragestheunderlyingnetworktopologyandperformanceinformationfortheselectionofsenders.Thisisbasedonanovelapplicationofseveralnetworkperformanceinferencetechniques;(2)itmonitorsthestatusofpeersandconnectionsandreactstopeer/connectionfailureordegradationwithlowoverhead;(3)itdynamicallyswitchesactivesendersandstandbysenders,sothatthecollectivenetworkperformanceoutoftheactivesendersremainssatisfactory.Weperformbothreal-worldmeasurementsandsimulationsofCollectCast.Oursimulationre-sultsshowthatCollectCast-basedP2PstreamingachievesbetterperformancethanP2Pstreamingbasedonlyonend-to-endnetworkperformanceinformation.Toperformthereal-worldmeasurements,weimplementaP2Pmediastreamingsyst