File distribution process.. BitTorrent..!
?? Saral Saxena ??????
?11K+ Followers | Linkedin Top Voice || Associate Director || 14+ Years in Java, Microservices, Kafka, Spring Boot, Cloud Technologies (AWS, GCP) | Agile , K8s ,DevOps & CI/CD Expert
BitTorrent implements an unstructured overlay network customized for file sharing.Nodes in the overlay are called peers, and the set of peers involved in the distribution of afile is referred to as torrent (or swarm). Each peer downloads the desired file, in chunks,from a multitude of other peers. While downloading missing chunks, peers upload to other peers in the same torrent the chunks they have already obtained. A peer can beeither a leecher, if it does not have a complete copy of the file, or a seeder, if it has already achieved a complete copy of the file (seeders only upload chunks to other peers). For each torrent, there is a tracker, that is, a node that constantly tracks which peers are involved in the torrent. A peer that wants to join a torrent must register with the tracker and, then,it must periodically inform the tracker that it is still in the torrent. The above figure shows the different phases in the download process. As a preliminary step, a peer contacts the tracker and receives a random list of peers belonging to the torrent.
It can thus open a TCP connection to a number of them and start exchanging chunks of the file. At any given time, the peer will be in contact with a set of other peers, called neighbors. The set of neighbors changes dynamically as peers join and leave the torrent. In addition, each peer preferentially selects, for downloading chunks, those peers from which it can achieve the highest download rate (see the following text). Finally, for every 30 s, the peer randomly selects a new peer from the list, as a way to discover new neighbors, and allows new peers in the torrent to start-up. At any given time, the peer has a subset of chunks composing the file.