1 / 22

Lecture XV: Real P2P Systems

Lecture XV: Real P2P Systems. CMPT 401 Summer 2007 Dr. Alexandra Fedorova. Outline. Skype BitTorrent. Skype. IP telephony system Allows users to make phone calls to Skype users to regular phone users Calls are routed via Skype nodes Central login server Super-nodes

kelda
Download Presentation

Lecture XV: Real P2P Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture XV: Real P2P Systems CMPT 401 Summer 2007 Dr. Alexandra Fedorova

  2. Outline • Skype • BitTorrent

  3. Skype • IP telephony system • Allows users to make phone calls • to Skype users • to regular phone users • Calls are routed via Skype nodes • Central login server • Super-nodes • Nodes that know about location of other nodes

  4. Skype P2P Network • Super-nodes are nodes with powerful CPU and network bandwidth • One has to qualify to become a super-node • Super-nodes know about locations of other nodes • Ordinary nodes contact super-nodes to place calls

  5. Skype Components • Skype client – the client program used to make phone calls • Host cache – list of other known Skype users, maintained at each Skype client • Skype login server – a centralized component. Processes account information, authentication

  6. Skype Bootstrap Procedure • Skype client depends on host cache to find other users • How does a new Skype client populate its host cache? • There is a list of bootstrap supernodeshard-coded into the Skype client • Skype client contacts them to • Find the login server • Find names of other Skype peers • Skype client continues maintaining and refreshing its host cache throughput its lifetime • It’s a good idea to let Skype running for a while before making a phone call!

  7. Skype User Search Procedure • A Skype client making a phone call needs to find other users • It contacts super-nodes from its host cache, asking them to help find the user • Super-nodes return a list of nodes to contact • The client contacts those nodes • If unsuccessful, the client asks for more nodes • Guarantees to find any user that has logged in within the last 72 hours • Not much specific information on Skype protocol is available…

  8. Outline • Skype • BitTorrent

  9. BitTorrent Overview • Website allowing peers to share music, video and other media files • Central server helps users find initial set of peers that have pieces of the file • Tracker server keeps track of peers possessing content of individual files • Users download the file by participating in exchange: • They exchange pieces that they have • for pieces that they don’t have • Therefore, for the system to work, users must have incentive to give • Users who just get, but do not give are called free riders • Protocol must discourage free riding

  10. BitTorrent Download Mechanism • Peers download pieces they need and upload pieces they have • Keep track of download rates from all links • Keep those with highest rate • Keep uploading to those peers • Choke the others (stop upload) fatter link = higher rate

  11. Selective Unchoking • Once in a while selectively unchoke one of the links • Allow some time (30 sec.) to see if the download rate will increase • If the download rate becomes greater than the rate at one of the existing links, chop the slowest of the existing links

  12. Game Theory on Exchange • Two traders A and B simultaneously exchange goods • They have to decide whether to participate in the exchange without knowing the other person’s decision • If a trader makes the exchange, he co-operates • If a trader does not make the exchange, he defects • Possible outcomes: • A co-operates, B co-operates – both benefit from receiving the other trader’s good • A co-operates, B defects – B benefits by receiving A’s good, by not giving away his own good • A defects, B defects – none receives the other trader’s good, but each gets to keep his own good

  13. Incentives • P – payoff • P(C) – payoff to co-operating player • P(D) – payoff to defecting player

  14. Strategies Encouraged By Incentives • Best individual strategy is to defect • But if both traders defect they are worse off than if they both co-operated • So the best strategy is to co-operate, but only if the other player co-operates

  15. Winning the Exchange Game: TIT-FOR-TAT • The exchange game: • Repeat rounds of exchanges with other players • Remember what other players did in previous rounds • Goal: maximize personal payoff • The winning strategy: TIT-FOR-TAT • Co-operate in the first round • In subsequent rounds do the same what the other player did • Properties of the winning player: • Nice – he begins by co-operating • Retaliatory – he won’t co-operate with players that do not themselves co-operate • Forgiving – will co-operate again if bad players fix their behavior • Clear – clearly communicates his intentions

  16. Analogy With BitTorrent • Goods exchange: exchange the piece of file that you have for the piece that you don’t have • Co-operate: upload the piece you have in exchange for downloading the piece you need • Defect: download the piece you need, but don’t upload (choke) • Payoff: • The piece you download • minus the cost of uploading the file

  17. Is BitTorrent Using the Winning Strategy? • Is BitTorrent player NICE? • No, it may choke an existing link upon finding a faster one • Is BitTorrent player RETALIATORY? • No, it uses optimistic unchoking • Is BitTorrent player FORGIVING? • Not necessarily – unchoked links are chosen arbitrarily • Is BitTorrent player CLEAR? • No, unchoked links are chosen arbitrarily

  18. Improved Incentive Mechanism • For each link, maintain: • Download amount d • Upload amount u • Upload to the peer as long as: u – d ≤ f * c • c – the fragment size • f – some constant • If u – d is large, the other peer is not co-operating • So you stop co-operating in return d u

  19. Comparison of the Mechanisms • Old mechanism: everyone experiences the same download time, regardless of the upload rate they provide • New mechanism: nodes that upload more enjoy faster completion time

  20. Comparison of the Mechanisms (cont.) • FO – free riders + old players • FN – free riders + new players • FNO – free riders + new players + old players

  21. Summary • Skype • IP telephony system • Relies on super-nodes, recorded in host cache • Skype client learns about initial super-nodes from bootstrap super-nodes • Centralized login server • BitTorrent • Media sharing network • File location is found in a centralized fashion (central server + tracker) • File download is P2P • System must encourage co-operation, discourage free riding • The right incentive mechanism is key

More Related