Alo Sarv
lead developer

Donate via

Latest Builds

version 0.3
tar.gz tar.bz2
Boost 1.33.1 Headers
MLDonkey Downloads Import Module Development
Payment completed
Development in progress.
Developer's Diary

Friday, October 21, 2005

(bt) downloads resuming, and speedmeters

Downloads resuming for torrents works nearly correctly now - there are still some unresolved cases (if a download is at 100% at the time of shutdown, but the bordering chunks aren't verified yet for example), but generally, it's working.

Also, Bt::Client class now implements BaseClient API, and speed-meters are correctly attached to correct files. For a moment there I thought I had a serious problem there, since Bt::Client downloads the top-level torrent (virtual file), but I needed to somehow indicate which files within the torrent were being downloaded; it was resolved, however, rather easily - namely, Bt::Client attaches it's download-speedmeter to whatever file contains the most-recently requested chunk; it does come with small overhead of re-attaching the speedmeter on each chunk start, but I didn't note any major performance hit from it. The top-level virtual file's speedmeter is just the sum of all child speedmeters, so even if children are downloaded from multiple sources, the top-level torrent correctly displays the overall speed of all children.

Other changes today include improved support for client-software and client-version detection (now detects all known BT clients, and there are about 30 of them out there), and preliminary support for seeding clients (Bt::Client no longer assumes implicitly that it's downloading, and has valid m_partData member).

Next complex topic is how to handle availability chunkmaps properly. The thing is, while availability-o-meters are attached to the top-level virtual file, and correct (rarest etc) chunks are selected, the child objects (downloaded by other modules, e.g. ed2k) have no knowledge right now about BT's availability of the file, since no availability-o-meters are added to the children. What makes the topic complex is the fact that PartData requires chunks to be of equal size (except for the very last one), and also requires chunks to have hashes. However, with this scheme, we'd need to start the first chunk at non-zero offset (due to chunks crossing file boundaries), and I'm not sure we want to attach hashes to those chunks either, since the hashes are already checked by the top-level virtual file.

Madcat, ZzZz

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?