Re: download problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Debarshi Ray wrote:
Say A, B and C are mirrors having bandwidth of x,y and z Mbps
respectively. So lets have an array which has: A, A, A... (x times),
B, B, B... (y times), C, C, C... (z times), and then generate a random
number within [0, x+y+z] and use that as an index to fetch a mirror
from the array.

No, your array should be something like :
([A,x];[B,y];[C,z])
and when you pick your random number within [0,x+y+z], you parse the array decreasing your random number until it is less than the current server bandwidth (unless your array is kept static, it would be more costy to generate it (its length will be the sum of server bandwidth) than to parse a server list).

But as far as I am concerned, I would prefer giving back to the user a list of nearby servers links (which may be picked bandwidth-randomly) in which the user would choose a server by itself.

François

_______________________________________________
Fedora-infrastructure-list mailing list
Fedora-infrastructure-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux