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

Saturday, October 22, 2005

(bt) seeding, and (core) framework for multi-net uploading

There are two topics today that were implemented, both providing base for future work over the next week or so.

Basically, ModuleBase looks at four values at 5-second intervals, and if those values fall below normal, it requests the module to open more upload slots via virtual function call. The four values are module's upload-speed (current and average), and global upload speed (current, and average). The logic is that when we set a "soft" upspeedlimit for a module (which can be exceeded, e.g. in order to use up all available bandwidth), we test against that, and if we'r working below that, open more slots; that raises this module's upload rate, which gets it closer to it's soft limit. Under ideal conditions, each module should end up uploading at their limit, no more, no less, and Scheduler will dynamically adjust each module's limits, based on how much incoming data we receive from them. The second phase (Scheduler part) isn't implemented yet, but right now, I'm already looking how BT and ED2K are competing for upload bandwidth.

Bittorrent uploading is rather complex topic on it's own tho. While Hydranode currently supports basic uploading, this is no where near what true BT clients do nowadays - choking and optimistic unchoking algorithms, for example; super-seeding ... and so on. So there's still a lot of work to be done in that area, but seems we'r getting somewhere.

Now running BT for longer time (will leave it running overnight, seeding), I'm also noticing that BT seems to be lot more connection-hungry than ed2k (altough we did several optimizations in ed2k to keep connection-counts low); BT will need optimizations in that area as well, for example when seeding, we can safely drop other seeds etc.

On an unrelated sidenote, PartData API now exposes setComplete() method, which allows explicitly marking a range in the file complete. This is part of public API, but should only be used when you truly know what you'r doing; the intended purpose is allow plugins to recover corruption (e.g. AICH), or in BT case, allow marking parts of PartialTorrent complete (called by TorrentFile).

Madcat, ZzZz

Comments: Post a Comment

<< Home

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