Package: approx Severity: wishlist Version: 2.8.0 Yodel!
This is a very obvious wishlist item - please support diffs. I see you've explicitly (and rightly) disabled them to fix a different bug. The obvious next step would be to properly support them. A possible solution would roughly look like this: * assumption: on the internal network, downloading the full package file is faster because the computation of the diff algorithm is the bottleneck. * assumption: the diffs should be fetched from the servers because they use less bandwidth. My first idea was for approx to keep denying requests for diffs, but assemble a new package file from the diffs in the backend, so that it wouldn't fetch full Package files from the server ever. But since the client would have to wait (and might run into a timeout) until the new package file is ready, a better algorithm might be: * if a client requests a full package file and the package file in approx is outdated, fetch the full package file from the server and stream it to the client (+ to the cache, of course) * if a client requests diffs and the package file in approx' cache is out of date, fetch the diffs from the server, stream them to the client and also assemble a new package file in approx. * if a client requests diffs and the package file in the cache is up to date, block the requests so that the client falls back to downloading the full package file. [Assumption #2] The nice properties of this algorithm (IMHO): * no clients time out, even if the line to the outside is sloooooow, so that downloading all the diffs to assemble the new Package file takes ages. * the doubled calculation (on the server and on the client) is probably just not an issue. There are few clients where the load matters that much. * The diffs need not be stored, thus no expiration for old diffs needs to be taken care of. * Package files are still the canonical metadata structure, so the package cache expiration needn't be touched. Obviously, the downsides are that this is probably quite a bit work to code (including getting the right behaviour during concurrent access from multiple clients while approx is downloading diffs) and that I'm not going to do the work at the moment (... one more really interesting project that I could do ...) So long... -- vbi (Oh, and: approx works nicely here! This is really just a wishlist bug and you're invited to keep it around unfixed for ages :-) -- Computers are a more fun way to do the same work you'd have to do without them.
pgpV3kpgKjz4s.pgp
Description: PGP signature