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

Sunday, January 23, 2005

Working on new PartData

As is known, the new PartData API is the biggest/hardest part of current short-term roadmap, and it is also the only reason downloading with hydranode is well... less than satisfactory performance. There are a bunch of problems the new PartData API needs to address, so it's taking a while to figure out all the details.

One possible interface candidate can be seen here. It addresses the following problems:
One current problem in the new API is the issue of keeping back references to given-out used ranges. As seen from the above link, the current idea is to use boost::weak_ptr, which is a weak reference to boost::shared_ptr. This way we do not interfere with the automatic destruction of UsedRange objects when they are no longer referenced to by anyone, while still having access to the data (the weak_ptr's expire when the corresponding shared_ptr is destroyed). However, this most likely needs a specialization of RangeList template which handles it properly. Only part of RangeList API needs to be specialized - namely, merge() and erase() methods will be omitted, since those cannot be handled really when dealing with pointer types.

Madcat, ZzZz

Comments: Post a Comment

<< Home

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