You didn't say what environment you're running in, but since we're in a pipelines discussion group, I'll assume CMS and Pipes....
Feed the 10 server names into a pipe, and prepend a random number to each. Then sort the list by the random number, and try the servers in that order. Just a really random stab, assuming you have the servers in a stem: Do I = 1 to servers.0 nservers.i = right(random(),10,0) || servers.i End Pipe Stem nservers. | sort 1-10 | Specs 11-* 1 | Stem serverlist. Then loop through serverlist. to access the servers. Sorry; it was too early to think up a Pipes only solution. -- Robert P. Nix Mayo Foundation .~. RO-OE-5-55 200 First Street SW /V\ 507-284-0844 Rochester, MN 55905 /( )\ ----- ^^-^^ "In theory, theory and practice are the same, but in practice, theory and practice are different." On 10/29/08 7:49 AM, "Colin Allinson" <[EMAIL PROTECTED]> wrote: > I have a list of 10 servers and a public routine that dispatches work to > them. The code tries each server in turn until it finds one that can > respond. > > I now want to randomly distribute the workload across the 10 servers so I > want to be able to sort the list into random order. I still want to try > all 10 servers once only until I find one that responds. It is fairly easy > to randomise the starting point and then go through them in sequence but I > cannot think how to sort the list itself into random sequence. > > Does anyone have any ideas how to do this? > > > > Colin Allinson > > Amadeus Data Processing GmbH > > > > > IMPORTANT - CONFIDENTIALITY NOTICE - This e-mail is intended only for > the use of the individual or entity shown above as addressees. It may > contain information which is privileged, confidential or otherwise > protected from disclosure under applicable laws. If the reader of this > transmission is not the intended recipient, you are hereby notified that > any dissemination, printing, distribution, copying, disclosure or the > taking of any action in reliance on the contents of this information is > strictly prohibited. If you have received this transmission in error, > please immediately notify us by reply e-mail or using the address below > and delete the message and any attachments from your system. > > Amadeus Data Processing GmbH > Geschäftsführer: Eberhard Haag > Sitz der Gesellschaft: Erding > HR München 48 199 > Berghamer Strasse 6 > 85435 Erding > Germany
