H
howa
conside an example like...
you have 5 Servers, one user queue, and you want to distribute the
users to these 5 servers, users come at different time, assume truely
random
a simple algorithm is to use Random to generate index 0..4 and assign
the server.
but think about it, if user come at random, why you need to use radnom
i don't know the implementation of Random, but seems a little bit
overkill the requirements...
a simple approach is to `mod` the current time and assign the server,
what do you abt this suitation?
thanks.
you have 5 Servers, one user queue, and you want to distribute the
users to these 5 servers, users come at different time, assume truely
random
a simple algorithm is to use Random to generate index 0..4 and assign
the server.
but think about it, if user come at random, why you need to use radnom
i don't know the implementation of Random, but seems a little bit
overkill the requirements...
a simple approach is to `mod` the current time and assign the server,
what do you abt this suitation?
thanks.