]> git.mxchange.org Git - quix0rs-apt-p2p.git/blob - TODO
Remove temporary files from the peer's download cache.
[quix0rs-apt-p2p.git] / TODO
1 Some last few things to do before release.
2
3 - Handle/investigate the HTTP client pipeline errors
4 - update the modtime of files downloaded from peers
5   - also set the Last-Modified header for the return to Apt
6
7 Consider what happens when multiple requests for a file are received.
8
9 When another request comes in for a file already being downloaded,
10 the new request should wait for the old one to finish. This should
11 also be done for multiple requests for peer downloads of files with
12 the same hash.
13
14
15 Packages.diff files need to be considered.
16
17 The Packages.diff/Index files contain hashes of Packages.diff/rred.gz 
18 files, which themselves contain diffs to the Packages files previously 
19 downloaded. Apt will request these files for the testing/unstable 
20 distributions. They need to be dealt with properly by 
21 adding them to the tracking done by the AptPackages module.
22
23
24 Improve the downloaded and uploaded data measurements.
25
26 There are 2 places that this data is measured: for statistics, and for
27 limiting the upload bandwidth. They both have deficiencies as they
28 sometimes miss the headers or the requests sent out. The upload
29 bandwidth calculation only considers the stream in the upload and not
30 the headers sent, and it also doesn't consider the upload bandwidth
31 from requesting downloads from peers (though that may be a good thing).
32 The statistics calculations for downloads include the headers of
33 downloaded files, but not the requests received from peers for upload
34 files. The statistics for uploaded data only includes the files sent
35 and not the headers, and also misses the requests for downloads sent to
36 other peers.
37
38
39 Rehash changed files instead of removing them.
40
41 When the modification time of a file changes but the size does not,
42 the file could be rehased to verify it is the same instead of
43 automatically removing it. The DB would have to be modified to return
44 deferred's for a lot of its functions.
45
46
47 Consider storing deltas of packages.
48
49 Instead of downloading full package files when a previous version of
50 the same package is available, peers could request a delta of the
51 package to the previous version. This would only be done if the delta
52 is significantly (>50%) smaller than the full package, and is not too
53 large (absolutely). A peer that has a new package and an old one would
54 add a list of deltas for the package to the value stored in the DHT.
55 The delta information would specify the old version (by hash), the
56 size of the delta, and the hash of the delta. A peer that has the same
57 old package could then download the delta from the peer by requesting
58 the hash of the delta. Alternatively, very small deltas could be
59 stored directly in the DHT.
60
61
62 Consider tracking security issues with packages.
63
64 Since sharing information with others about what packages you have
65 downloaded (and probably installed) is a possible security
66 vulnerability, it would be advantageous to not share that information
67 for packages that have known security vulnerabilities. This would
68 require some way of obtaining a list of which packages (and versions)
69 are vulnerable, which is not currently available.
70
71
72 Consider adding peer characteristics to the DHT.
73
74 Bad peers could be indicated in the DHT by adding a new value that is
75 the NOT of their ID (so they are guaranteed not to store it) indicating
76 information about the peer. This could be bad votes on the peer, as
77 otherwise a peer could add good info about itself.
78
79
80 Consider adding pieces to the DHT instead of files.
81
82 Instead of adding file hashes to the DHT, only piece hashes could be
83 added. This would allow a peer to upload to other peers while it is
84 still downloading the rest of the file. It is not clear that this is
85 needed, since peer's will not be uploading and downloading ery much of
86 the time.