If anyone's curious, we just covered this in one of my classes at Uni, here's what I have;
There are a number of different parts to the BitTorrent architecture;
a. The files to be downloaded;
b. The .torrent metafiles;
c. Torrent Trackers;
d. The BitTorrent client software;
e. Downloaders ( including a seed ), and;
f. Uploaders.
The files to be downloaded are simply any file to be shared via the BitTorrent Protocol on one or more computers.
To share these files, .torrent’s must be made. Each .torrent can contain information about more than one file, or a directory of files, each of which has information pertaining to its Length, name, hashing information, and the URL of a tracker.
A .torrent metafile is downloaded like any other file from the Internet, then using the BitTorrent client software, connection(s) are established with the help of the Trackers.
A Tracker is an application running on a stable server machine which keeps track of downloads, uploads and where files ( or parts there-of ) can be located. Usually Trackers only handle a handful of torrents at a time, but they can handle many more without too much increased over-head. When requested, the Tracker sends a random selection of peers holding the desired file to the Downloader.
Once the Tracker has sent the required information back to the Downloader, the BitTorrent software creates a direct connection over TCP to the peers specified. Once these connections are made, the host(s) of the file is called the ‘Uploader’ and the client downloading this file is aptly called the ‘Downloader’. The Uploader announces to all Downloaders which part(s) of the file it has, and the Downloader’s client software then handles which connections to commit to, and which ones to abandon.
During the process of transferring the part of the file, periodical information is sent back to the Tracker so it knows where to find new parts of the file to distribute to other Downloaders.
To initially make a file available, a Downloader known as a ‘seed’ must first host the entire file. Once the file is downloaded at least once in its entirety, the tracker can split the total download 50/50 between the two hosts. Then as more people download the file, the more parts become available, thus reducing the bandwidth needed for any one individual to upload a file in its parts.
Using a Tit-for-Tat method of granting connections, those who only download and do not allow uploads will suffer greatly from being selfish. When connections are established, if the Downloader is not offering anything to Upload, then the connection is choked, not allowing an upload, and as such suffers from having fewer connections to Download from.
BitTorrent's peer-to-peer download process (HowStuffWorks, Inc. 2005)
To keep download and upload rates from suffering, Chocking Algorithms are implemented. This means that a peer is refused an upload, but downloads may still occur from them to the Downloader.
Using the Tit-for-Tat method as well as having at least 4 connections choked at any one time, a 10 second roll-around time is used to check for changes in download speeds with the peer to recalculate who should and shouldn’t be choked. Every 3 cycles, a random peer is unchoked on the premise of forgetting the assumption that the peer with the fastest download connection also has the fastest upload.
(Cohen, 2003).