1 / 24

An example of peer-to-peer application

Learn about the benefits and various areas of application for peer-to-peer (P2P) networks, including file sharing, telephony, media streaming, and more. Understand how P2P networks work and the advantages they offer over client-server architectures.

earlf
Download Presentation

An example of peer-to-peer application

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. An example of peer-to-peer application Jin Sa

  2. Category of P2P • ‘Pure' P2P networks: • Peers act as equals, merging the roles of clients and server • There is no central server managing the network • Decentralized, nodes have equal role/capability and peer communication is symmetric. • truly dynamic and less vulnerable to downtown time since there is no critical component. • Hybrid P2P systems: • super nodes keep keeps information on peers, index of the resources or allocating tasks in the system. • Peers host resources, letting the super nodes know what resources they want to share • Hybrid has better performance than pure, but limited by the availability of the indexing servers.

  3. Advantages of P2P networks • Easily scale up or down • Total capacity of the system increases as the number of participates increases. • not true of a client-server architecture with a fixed set of servers, more clients could mean slower data transfer for all users. • Better bandwidth utilization since the peers communicate directly with each other

  4. Advantages of P2P networks • The distributed nature of P2P networks also increases robustness in case of failures, • in pure P2P systems, no single point of failure in the system. • Richness and diversity in services/resource available in the network

  5. Areas of application • File sharing (e.g. BitTorrent) • Telephony (e.g. Skype) • Media (audio/video) streaming (e.g. iPlayer Download Manager)

  6. P2P File distribution • Distributing a large file from a single server to a large number of hosts (peers) • In client-server, the server sends the file to each peer. Hence enormous amount of server’s bandwidth • In P2P, each peer can redistribute any portion of the file, assisting in distributing the file. Hence scalable • Example: BitTorrent • Popular P2P protocol for file distribution • http://www.bittorrent.org/introduction.html

  7. BitTorrent application • BitTorrent protocol, designed by Bram Cohen • http://en.wikipedia.org/wiki/BitTorrent_(protocol) • A BitTorrent client is a program that implements the BitTorrent protocol. • Each client can prepare, request, and transmit any type of computer file over a network • A peer is any computer running an instance of a client.

  8. BitTorrent overview • Peers download files by participating in a file swarm which is an ad-hoc network of peers that are temporarily assembled to distribute a particular resource. • Peers in a swarm download equal size chunks of the file from one another.

  9. BitTorrent Overview • The protocol works when a file provider makes his file the first seed, which allows others peers, to download their data. • Each peer who downloads the data also uploads it to other peers • Peers are encouraged to continue making data available after the download has completed, and becoming additional seeds. • Peers that provide a complete file are called seeders, and the peer providing the initial copy is called the initial seeder.

  10. BitTorrent Model Referenece: http://www.medianet.kent.edu/surveys/IAD06S-P2PArchitectures-chibuike/P2P%20App.%20Survey%20Paper.htm#_2.2_Bittorrent

  11. BitTorrent Index • A BitTorrent index is a list of .torrent files (usually including descriptions of the file and other information) • Managed by a website, that is available for searching files to download

  12. Torrent (.torrent) files • This refers to the small metadata file that contains information about the data you want to download, not the data itself. • Typically, a torrent file specifies the URL of the tracker, and contains names for the files, their lengths, etc. • Torrent files are typically published on websites.

  13. BitTorrent Tracker • A tracker is a server which assists in the communication between the peers • The tracker maintains lists of clients currently participating in the collection of clients uploading and downloading. • When you open a torrent file, your machine contacts the tracker and asks for a list of peers to contact. • Periodically, throughout the transfer, your machine will inform the tracker about your status: e.g. how much downloaded and uploaded.

  14. Tracker and indexing website • Many BitTorrent websites act as both tracker and index. • They publish the tracker's URL so that users can embed the tracker's URL in the torrent file. • Provide all the features necessary to initiate a download.

  15. BitTorrent Operation • To share a file, a peer first creates a small file called a "torrent" (e.g. MyFile.torrent). • This file contains metadata about the files to be shared and about the tracker. • Peers that want to download the file must first obtain a torrent file for it, and connect to the specified tracker, • which tells them from which other peers to download the pieces of the file from.

  16. BitTorrent Operation • Trackers is responsible to help downloader locate one another in the system by keeping track of the seeders and downloaders. • Each peer polls the tracker for information about other peers to find suitable peers to trade pieces. • Tracker responds with a random list of peers that are participating in the transfer.

  17. BitTorrent Operation • Peers report to the tracker information about • what pieces it has, • its download and upload rate, • its IP address and port the Bittorrent client application is running on.

  18. BitTorrent Operation • Peers continuously trade piece with other peers until they have obtained the complete set of file pieces. • The order in which pieces are request from other peers is optimized to improve their download rates. • Once a peer has at least one complete piece to trade, it uses a strategy of piece selection by choosing to download rare pieces in the network

  19. BitTorrent Operation • For file downloads to be successful, at least one peer (seeder) with the complete file must participate in the transfer • As more peers in the system complete their download and remain as seeders in the network, request for file start to complete quickly since each new peer participating in a file swarm adds additional upload bandwidth.

  20. peer Tracker peer Alice A Scenario of File Distribution Obtain list of peers peer

  21. Alice gets connected • Alice joins the swarm • Tracker randomly selects a list of peers, sends the IP addresses to Alice • Alice attempts to establish TCP connections with the peers • Alice successfully connects to some peers (“neighbouring peers”) • Neighbouring peers fluctuate over time as some leave and other peers attempt to connect to Alice. • Periodically, Alice asks each of her neighbouring peers for the list of chunks they have

  22. Alice’s decisions • Which chunk to request first from her neighbours? • Rarest first, i.e. the chunk with fewest copies among the neighbours • Increase copies of the rarest chunks • To which of her neighbours to send requested chunks? • Give priority to neighbours supplying her at the highest rate. • Every 30 seconds Alice randomly choose a new trading partner • Peers uploading at compatible rates tend to find each other. • Reduce free-riding.

  23. BitTorrent download vs client server download • BitTorrent makes many small data requests over different TCP sockets, while web browsers typically make a single HTTP GET request over a single TCP socket. • BitTorrent downloads in a random or in a "rarest-first" approach that ensures high availability, while HTTP downloads in a sequential manner.

  24. Refereneces • http://en.wikipedia.org/wiki/BitTorrent_(protocol) • A clip by on BitTorrent • http://www.youtube.com/watch?v=fWBXhiGGEPk

More Related