4. The Question :- How??
• To know the whole process, we need to
understand basic stuff. And, to make it simple,
we’ll read a story.
5. The story!
• Imagine…
You’re sitting in an exam hall. But (as
expected), you don’t know answer to a
question. But, you can read people’s mind.
You’ll read everyone’s mind and conclude
which of them know the answer. Then, you’ll
conclude(by reading minds), who knows the
full or partial answer. And, at last, you have
your answer.
6. Compare…
• Now,
The answer you don’t know = the file to be downloaded
Mind reading ability = BitTorrent client
Reading of mind = peer exchange/torrent download
People who know complete answer = Seeders
People who know partial answer = Leecher
7. One more Layman Example…
• There is one person having a book, 30 people
want to read. Two possibilities :-
1) The person having book will go to each
person to let them xerox the book. (problem :-
It might take a lot of time. )
2) The person having book won’t let other 29
copy. (oh no, this is not what we want!)
8. Optimal solution…
• In this situation, optimal solution would be :-
The 29 go to the 1 and each tear out a page and
photocopy it, then give it back. Now everyone has at
least 1 page. Now they can either go back to the 1
person and get another page, or they can go to any
of the other people and get a copy of the pages they
do have.
9. How to see it in “Torrent’s” terms?
• The peers first obtain a metadata file for each
object.
Now, What does meta-data contain?
The SHA-1 hashes of all pieces.
A mapping of the pieces to files.
Piece size.
Length of the file.
A tracker reference.
10. How to see it in “Torrent’s” terms?
• First off, File is split up into pieces…
And, SHA-1 is created for each part.
11. How to see it in “Torrent’s” terms?
(The secret)
• The file pieces are downloaded by leecher,
meanwhile, replicas of file are created. As
soon as a leecher has a completed download
of a piece, it can potentially share it with
other downloaders. Eventually each leecher
becomes a seeder by obtaining all the pieces,
and assembles the file.
12. • And, This was the stuff you didn’t knew was
happening, when you were downloading a
movie from torrent last time!
Editor's Notes
Why optimal?
As time goes on, some people drop off, and some people join in, but among this miniature community, hopefully, there are enough pages to reconstruct the whole book. If everyone stays available long enough, a lot of people end up having the whole book and can speed up the whole process, since there are multiple sources for potentially "rare" pages