BitTorrent Presentation
BitTorrent Presentation
BitTorrent Presentation
What is BitTorrent?
Efficient content distribution system using file swarming. Usually does not perform all the functions of a typical p2p system, like searching.
http://www.cs.uiowa.edu/~ghosh/bittorrent.ppt
Bram Cohen in 2001 Designed to transfer large files 160 million clients, 100 million active users Used by many different people and organisations
Peer-to-peer in nature Central server called a tracker Tracker uses HTTP Download and upload at the same time Efficiency improves the more a file is downloaded
By David Hannaford
Application
Is used to send and receive large files of any type including but not limited to Video, audio, executable files and images. Streaming (or progressive downloading) is currently not supported by the Bit Torrent protocol due to fact that torrents are downloaded in a non-sequential data transfer downloading the rarest file part first (section of file between 32kb and 4MB).
Application
Bit Torrent Activities: Download a torrent (become a leacher) Have another servent download from you (seeder) Publish by creating a .torrent file and uploading onto tracker
Uploading
Once the Torrent Client is started, it is possible for other servents to download from you. Uploading is shown in main screen, it is necessary to allow uploads as this will prevent throttling inherent in the Bit Torrent protocol.
3 The client holds a list of peers that are participating in the torrent and supplies this list
Seed
Peers exchange different pieces of the file with one another until they assemble a whole
As soon as the user has a piece of the file on his machine, he can become a source of that piece to other peers, helping speed
The key ingredients of the *.torrent file are the trackers address and the unique SHA1 hash
All data in a metainfo file is bencoded. info: a dictionary that describes the file(s) of the torrent. announce: contains the URL of the tracker creation date Comments from the author(optional) created by: (optional) piece length: number of bytes in each piece (integer) pieces: string consisting of the concatenation of all 20byte SHA1 hash values, one per piece private: (optional) is a field where the client requests to avoid publicising its request beyond trackers the filename
http://wiki.theory.org/BitTorrentSpecification
Tracker->Client response
The tracker responds with a text document which contains the following key features: failure reason and/or warning message: If present, then no other keys may be present. The value is a human-readable error message as to why the request failed (string). interval: Interval in seconds that the client should wait between sending regular requests to the tracker tracker id: A string that the client should send back on its next announcements complete: number of peers with the entire file, i.e. seeders (integer) incomplete: number of nonseeder peers, aka "leechers" (integer) peers: (dictionary model) The value is a list of dictionaries,
http://wiki.theory.org/BitTorrentSpecification
When peers are interested and not choking each other, data is exchanged
Peers start communications with a handshake The handshake is a required message and must be the first message transmitted by the client.
Contains identifiers of the protocol in use, the peer ID and the SHA1 hash of the file being chased If a client receives a handshake with an info_hash that it is not currently serving, then client drops connection.
Each client keeps track of whether it is CHOKING and/or INTERESTED in remote peers
Am choking Peer choking Peer not choking Peer interested Block uploaded Block downloaded Am not choking Am interested
Ongoing message are then exchanged to facilitate transfer. Other messages that are exchanged include keep alive as clients maintain regular contact to stay active, and Have which is the vital message that a peer has a particular piece of a file http://wiki.theory.org/BitTorrentSpecification
Peers choose to choke one another based on self-interest and self-interested charity
Object of good choking algorithm Should cap # of simultaneous uploads for good TCP performance. Should reciprocate to peers who let it download. No fibrilation:Should avoid choking and unchoking quickly Should try unused connections once in a while to find out if they might be better than the currently used ones Bit Torrent toggles only once per 10 seconds For optimistic unchoking, at any one time there is a single peer which is unchoked regardless of its upload rate . Rotates every 30 seconds. New guys entering the game get 300% chance of being OU to help them get started. How BitTorrent works 4 Peers with best upload rate get prioritisation
http://wiki.theory.org/BitTorrentSpecification
Comparison
Comparison carried out by downloading Open Office 3.3. File available to download from http://www.openoffice.org/ Straight download took < 20 mins. MD5 Checksum available to verify download.
BitTorrent
Transmission BitTorrent Client. Version 3.3 not available from official source. Older version downloaded for comparison. (similar file size approx 150MB). Max 57 peers during download. Download took approx 45 mins. Power cut half way through.
BitTorrent
Version 3.3 found on unofficial site. 3 peers sharing. Download took approx 25 mins. No checksum available to verify file.
Points
BitTorrent provided slower download on this occasion. Trust issue. File availability. Robust. Benefit to distributor. Personal data usage was doubled.
Http: Guaranteed availability, constant bandwitdth, sequential downloads using one TCP connection via port 80
Bittorrent: Availability is not guaranteed, slow initial speed, many TCP connections via many ports, more resilient, cheap
Hard factors: Size of the swarm, swarm dynamics and the total bandwidth Health of the files being shared (Seeder / leecher ratio) Willingness of peers to share
Soft factors:
Coordinating protocols applied by trackers Policies of sharing applied by users / bittorrent clients
Availability
Coordinating protocols determine which piece will be served to which peer. (random / rarest first / superpeer) Private hosts / trackers
Speed Distributed Hash Table (DHT) Peer exchange Local Peer Discovery Protocol Encryption, Half-Open Connections and uTP UDP Packet Protocol to circumvent ISP throttling Capping Upload Speed Tit for tat - assures reciprocity between downloading and uploading rates Optimistic unchoking gives chance to newcomers
BITTORREN T
3. *.TORRENT metafiles/trackers
- A grey area
4. Content files
There have been several closures of tracker sites in recent years: 2004: 2004: 2005: 2005: Finreactor Bittorent site shut down by police Suprnova.org shut down by Slovenian authorities EliteTorrents.org shut down by F.B.I. Bittorent up loader in Hong Kong faces criminal charges
3. *.TORRENT meta2006: The Pirate Bay.org raided by Swedish police. Charges files/trackers
- A grey area currently being appealed.
2010: The US Copyright Group begins to acquire IP address of those using Bittorrent to download certain movies.