BitTorrent is a Protocol for exchanging files over the Internet. It was created by American computer programmer Bram Cohen, who wrote the first torrent client “BitTorrent” in Python in April 2001. Files according to this Protocol are transferred parts, and every torrent-client, receiving these parts at the same time, gives them to other customers. How does the BitTorrent Protocol — this is in the news today!
The principle of operation of the Protocol is that the load on the distribution of the file decreases due to download customers. They begin to communicate immediately, even if the file is not datacan them to the end.
To work BitTorrent, as a rule, requires a tracker — a dedicated server running over HTTP. It is needed for clients, called peers could find each other. Before downloading the client connects to the tracker specified in the torrent file address, tells him the address and the ID of the file you want to download (it is called a hash sum). In response, the client receives the addresses of other clients who download or distribute this file. Subsequently, the client periodically informs the tracker about the process and receives updated lists of addresses. The peers connect to each other and exchange segments of the file without the direct involvement of the tracker. It only stores the information received from clients. There are also bestresume system in which the tracker is available in a decentralized manner — by clients in the form of a distributed hash table.
When you connect clients directly exchange information about their segments. The exchange of data begins when each side has segments that are not in the other. PIR wants to download a segment, also called the Lich, sends a request and receives from the respective client. After that it verifies the checksum segment. If it coincided with that recorded in the torrent file, the segment is successfully downloaded, the client informs all about it in this segment. If the checksums are different, the segment is downloaded.
The number of transferred segments is calculated, and if one of the parties finds that on average transmits more than it receives, it blocks for a while out of the other side. This makes for a more efficient use of channel impact. When choosing who to unlock, preference is given to customers who gave a lot of segments.
The exchange procedure is chosen so that the first customers were exchanging the most rare segments, thus increasing the availability of files in the distribution. The segments themselves are divided into a block size of 16 to 4000 kilobytes. At the same time can request the blocks from different segments.
When the download is almost complete, the client is called the end game. He asks all the remaining segments all have dealer clients that allows you to avoid slowing down is almost complete of injection.
Upon receipt of the complete file, the client becomes the led, that is, goes into a special mode in which it only gives data. Further, the led periodically inform the tracker about changes in the status of the torrents and updates the lists of IP addresses.
How does it work? | BitTorrent
Hi-News.ru