|
From: | Alois |
Subject: | [Mldonkey-users] New source management |
Date: | Mon, 23 Dec 2002 15:09:43 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20120912 |
MLdonkey wrote:
Yes, this would definitly be better then storing the clients in seperated files. I think, that every source should get some kind of rating. Start rating of an unknown, new source that has one needed file is perhaps 1 for an normal Edonkey source, 1.1 for a newMLDonkey source, 0.8 for an Emule source etc. This number is sorted into the array to the other sources. The first item of the array is being connected maybe every 0.1 seconds. (or whatever this delay is set to). And the array has a max_length. If max_length is reached, the worst rated sources fall out. After a source was connected, it is rated again: If it has needed chunks, the rating is increased (rating=old_rating+2), if the connection fails, it is lowered (e.g. -3), if it has rare chunks it is increased even more (+4) and so on. There could also be a file priority setting, so that every source that has a priority file gets a higher rating.K, so what we need is a function that choose where to put the source at the end of a connection attempt. It has to determine two parameters for the next reconnection attempt: - how long should we wait - within those other sources that have to wait for the same delay, in which priority Then, we don't need the names for the sources sets anymore, there would simply be a sorted array, each index being a fifo of sources, the fifos being sorted by their priority, each fifo containing the sources that use the same period between reconnections. When a new slot for a connection is free, we iter on the array to find the first source that can be connected immediatly.The function would take into account many different parameters: - did the connection work or not ?- did the client contains new chunks for our files ? - what is the best priority in these files ? - what kind of client is it ? - do we have some upload credit on this client ? Is this better ? - MLDonkey
Of course, there would be some problems like the retry-timers and CPU usage, but I think they can be solved.
P.S: I think that your mail that I'm answering to didn't make it into the mailing list...
[Prev in Thread] | Current Thread | [Next in Thread] |