On Feb 14, 2007, at 9:01 PM, Kem Tekinay wrote:
On 2/14/07 8:42 PM, [EMAIL PROTECTED] at [EMAIL PROTECTED]
wrote:
... What is the best way to go about this? ...
How long will this method take for each iteration? Keep in mind
that a timer
runs during idle time, and the program will become unresponsive
while it is
running. If this takes fraction of a second, go that way. If it
takes a
second or more, a thread is probably the better option.
The process polls the status of the jobs running on an Xgrid
controller. On Gigabit Ethernet, this takes at most a quarter second
per job. On a 128 Kb/S Internet connection, I have never seen more
than two seconds per task.
Now, whatever I end up doing here isn't going to be final. Right
now, I am using the console app located at /usr/bin/xgrid to
interface with Xgrid, just for the sake of getting it working, and
this task I need to execute regularly is a short series of shell
commands. When it works, I am rewriting these classes to use
declares and hook into the Xgrid or GridEZ frameworks. The advantage
of the frameworks is that it's all event driven. It is not necessary
to poll the controller when using the Xgrid framework because the
controller will send you a message when something changes.
Also, I have found another way to do this updating, and it involves
many fewer instances - anywhere from 1 to 5 simultaneously. I think
I'll take that route and make them subclasses of threads.
- Andrew Keller
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>