Consider the following simplified BitTorrent scenario. There is a swarm of 128 p
ID: 3891829 • Letter: C
Question
Consider the following simplified BitTorrent scenario. There is a swarm of 128 peers and, during a considered time period, no peers join or leave the swarm. It takes a peer 1 unit of time to upload or download a piece, during which time it can only do one or the other. Initially one peer has the whole file and the others have nothing. If the swarm's target file consists of only 1 piece, what is the minimum time necessary for all the peers to obtain the file. Ignore all but upload/download time. The answer choices are: 5,6,7,32,64,128. This is answered on Chegg for numbers other than 128 peers. The course textbook is Computer Networks A Systems Approach by Larry Peterson, although this question is not in it.
Explanation / Answer
Peer:someone who does not currently have the completed file.
When a peer is connected, he downloads the pieces he does not have and uploads the pieces he does have. You are a peer if you do not have a complete copy of the file you're trying to get.
Seed: A Seed is someone who already has the complete file but is still sharing. If there are no Seeds, the only way to get a complete file is if all the pieces of the file can be found amongst the peers that are connected. In most cases, when there is no Seed, you probably won't get the whole file.
Tracker: The tracker is a server that has all the info about the people that are
down- and uploading the file. The tracker itself does not have a copy of the file, it only tracks the people who have the file (seeds) and the people who have part of the file (peers). Torrents can be tied to a specific tracker, but most clients now support trackerless torrents, making it less likely that you will be hurt if you can't find the
original tracker.
Swarm:
Together, all the Seeds and Peers who are using the same torrent on the same tracker with you. For example, six Peers and two Seeds on the same tracker make a swarm of eight. So your Swarm is NOT the users you are connected to. It's perfectly normal NOT to connect to ALL seeds and peers in a swarm. In a minute, we'll even see how the opposite is true.
First, when you look at the numbers in the Seeds and Peers columns, we see 2 numbers in each column: x(y).
SEEDS :
x = the number of seeds from which your client is currently downloading pieces.
y = the total number of seeds in the swarm
So, if you see 5 (14) under Seeds, you are connected to 5 out of 14 seeds. The tracker knows about 9 more seeds to which you are NOT connected. This could be because these seeds only allow a limited number of connections or there could be other reasons.
Once you get the complete file, you will no longer connect to Seeds because, as a Seed
yourself, you don't exchange any data with other Seeds. Your client still shows you the Seeds in your swarm so you see something like 0(14).
If you see something like 12 (4), it usually means the tracker only knows about 4 seeds in your swarm, but thanks to a feature called DHT you were able to connect to seeds outside your swarm.
The minimum ~3min(180 sec) time necessary for all the peers to obtain the file.