Project

General

Profile

General approach » History » Version 4

Greg Burri, 04/05/2011 11:00 PM

1 1 Greg Burri
h1. General approach
2
3
Each file the user want to share is cut sequentially in pieces called _chunk_. Each chunk has the same size except the last one which can be smaller.
4
5
For each chunk there is a footprint called _hash_ which identify the chunk. We admit that two chunks with the same hash contains the same data. The hash is computed with a cryptographic hash function like SHA-1.
6 2 Greg Burri
7
A chunk can only be downloaded if we know its hash. The hashes associated to a specific file can be given when browsing remote files if the remote peer knows them or can be explicitly asked. If the remote peer doesn't know the hashes of one of its file when they are asked it will compute these hashes on the fly and send them one by one as soon as possible.
8 3 Greg Burri
9
The list of the files to download is ordered by the user, thus the top files must be downloaded first. We will try to know first the hashes of the top files. As soon as we know a hash we can try to download the associated chunk. There can be many parallel downloads but only from different remote peers. The number of parallel downloads is limited.
10
11 4 Greg Burri
To choose a chunk to download we will take the first file having at least one un-downloaded chunk which has at least one free peer, then among theses chunks we will choose the one which have the minimum number of peer (rarest part first), if there is some eligible chunk we choose randomly.
12 3 Greg Burri
13 4 Greg Burri
To known which remote peer has which wanted chunk we asked periodically to all remote peers if they have the next chunks we want to download by sending them the corresponding hashes. The number of hash sent is limited. This can be achieved with with multicast UDP.
14 3 Greg Burri
15
16
h2. Glossary
17
18
A file:
19
A peer:
20
A free peer:
21
A remote peer:
22
A chunk:
23
A hash: