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

Wednesday, October 26, 2005

More black magic in Bt::Files system

As was pointed out to me regarding the hydranode uptime records, I'd like to clarify - both records were ended not because hydranode crashed, but, in my case, since my server locked up due to broken video driver, and chemical's, cos he wanted to upgrade to newer build. On memory/cpu-usage leaking for that long uptime, I did experience rather large leakage (tho most of the issues were fixed shortly afterwards), but chemical didn't report any memory/cpu-usage raising over that long uptime period.

Anyway, looking at devcenter timeline, it's been 18 checkins today, total 75 checkins during last 7 days, which indicates rather high activity (used to be 50 checkins/week average).

Wubbla has been busy improving HTTP module - HTTP redirections work properly now, HTTP proxy support was added, and the plugin is now capable of handling really complex urls, like http://user@password:hostname:port/path/file?query#anchor for example. Unfortunately, hnsh parser can't handle that stuff yet - to be added shortly.

On Bittorrent side, there's been a lot of additional black magic being done. Basically, after 12 hours of heavy coding there, it's now possible to cancel, pause, resume and stop files within a torrent, and it handles everything correctly. There's a lot of tricky stuff going on there, doing checksums with mixed set of real files and cache files etc, but it works correctly now. There are some unhandled situations tho - namely, in childPaused() method, it only works correctly right now when the chunk crosses only two file. Situations where files from both ends of an overlapping chunk are removed (e.g. two consequent files in the torrent), or when chunk crosses three or more files, aren't handled properly there yet (altough other code handles that properly), so seems I can say it again - one more function to update for tomorrow. As they say - "There's always one more bug" :).

On Bt::Client side, we had some protocol compatibility problems, namely availability bitfields were generated incorrectly, we failed to start uploading when socket was already writable when requests came in, and other miscellaneous things, so those 9 of you (yes, all 9 of you downloading that suse dvd), upgrade immediately to latest version. Basically, the bitfields were (a) generated again for each client, and with 14'000 chunks as that suse dvd torrent has, it took quite a long time. Now at least OUR chunkmap is cached in TorrentFile, and updated in-place when new chunks are downloaded, so no generation happens. However, for incoming BITFIELD messages, we still need to manually transform the bitset to std::vector that Hydranode uses internally, and that's a really slow operation - it slows down the client even on my 3.2ghz system. We'll see if we can optimize something there ... turning on optimizations will have large effect there tho, so maybe we won't have to optimize it by hand.

Madcat, ZzZz

Comments: Post a Comment

<< Home

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