I recently committed a set of interesting new features on the "devel" branch.

In particular, I would like to highlight the support for "rarest chunk"
downloading.  This is something that had been sitting on my TODO list for
almost 9 years, but I always had something more important to do, and I lacked
the proper data structures to do that efficiently.

This has now been fixed and the rarest-chunk alogorithm kicks in when there
are partial files among the sources of a file.  It splits the file to download
in chunks, sorted by how many sources actually do supply us with these chunks.
And it then selects the ones offered by the least amount of sources to download
first.

This has two nice consequences:

- It protects against lossage of full sources: because the rarest chunks have
  been already downloaded, the ones offered by the partial sources can then
  be downloaded and the full file can be reassembled locally.

- It maximises the usefulness of partial sources: when downloading from a full
  source, the algorithm will not pick chunks made available by partial sources,
  if it can avoid it, and therefore these partial sources will be able to
  fully contribute to the download speed-up when they become active.

This looks very promising.  Algorithmically, the implementation relies on
red-black trees to efficiently store the set of chunks, ensuring logarithmic
search time.  This is much better than the old linear search that was done.

The chunk pick-up code for downloading with only full sources will benefit
from this algorithmic improvements because the set of available HTTP ranges
is now stored in a red-black tree as well, and no longer in a plain list.

There are also other minor (but hopefully nice) improvements recently committed
that should further help with 9+ year-old bugs in the alt-loc processing.
For instance, I accidentally discovered that support for X-Nalt (negative
alternate locations) was not 100% finished -- we were parsing these locations
but we were never actually remembering them as being "bad".

Anyway, please test these new features by updating from the "devel" branch in
git and let me know if something odd occurs, or if these new features cause
a crash somehow, due to the presence of new assertions and new logic.

Thanks,
Raphael

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
gtk-gnutella-devel mailing list
gtk-gnutella-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel

Reply via email to