Or write a file for each element of work and write it into an SFS directory. Let the workers pick work from the SFS directory by finding an unlocked file, locking it, reading it to get its marching orders, do the work, delete the file, and then look for another unlocked file. There are a few housekeeping things done by the "master" server after writing a file to the work queue in SFS such as sending a MSG to all the servers as a sort of wakeup call.
It works here for us. -----Original Message----- From: CMSTSO Pipelines Discussion List [mailto:cms-pipeli...@vm.marist.edu] On Behalf Of Rich Greenberg Sent: Wednesday, January 05, 2011 12:11 PM To: CMS-PIPELINES@VM.MARIST.EDU Subject: Re: Pick a record at random? On: Wed, Jan 05, 2011 at 09:11:26AM -0500,Bob Cronin Wrote: } Think of my love of using the random approach this way ... let's say all the } workers are idle ALL the time. If I did not pick one at random then the } first one on my list would always get ALL the work. I realize it doesn't } make a difference as long as the work gets done, but for me personally, I } would rather see all the servers doing approximately the same amount of } work. I know, its insane, but I am funny that way, and I am not going to get } over my personal peccadilloes this late in life, so humor me, willya? ;-) OK, consider yourself humored. :-) The simplist way to do this is a simple round robin. Say you have 10 servers, WORKER0, WORKER1,,,,,WORKER9. UNTESTED rexx (could probably be done in a pipe also): /* Start here when spool file nnnn arrives. */ n = n + 1 /* Unitial value of n = 9 */ if n > 9 /* Thats a greater than sign. */ then n = 0 'CP TRANSFER * RDR' nnnn 'to WORKER' || n 'RDR /* For safety put some code that checks to see how many rdr files WORKERn has and trigger some recovery if too many. */ exit -- Rich Greenberg Sarasota, FL, USA richgr atsign panix.com + 1 941 378 2097 Eastern time. N6LRT I speak for myself & my dogs only. VM'er since CP-67 Canines: Val, Red, Shasta, Zero & Casey (At the bridge) Owner:Chinook-L Canines: Red & Cinnar (Siberians) Retired at the beach Asst Owner:Sibernet-L