On 11/8/06, <b class="gmail_sendername">Phil Mayers</b> &lt;<a href="mailto:p.mayers@imperial.ac.uk">p.mayers@imperial.ac.uk</a>&gt; wrote:<div><span class="gmail_quote"></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
To be honest, the problem still seems a little abstract to me, and I'm<br>having a hard time figuring out exactly what you're trying to achieve.<br>Surely the clients have to submit *some* form of completion status to<br>
the PB server?</blockquote><div><br>Ok.&nbsp; The thing I am trying to design/code is a job distribution system, for a distributed computation model.&nbsp; There is a server which interacts with the job database (which is just a bsddb).&nbsp; The server accepts connections from clients and distributes jobs to them.&nbsp; The server also accepts connections from a 2nd type of client, which submits jobs to the server.&nbsp; 
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The &quot;Monitor&quot; portion of the clients seem superfluous - what does it
<br>achieve that having the worker submit the completion does not?</blockquote><div><br><br>
For the clients whose sole purpose it is to get and process jobs, I
initially envisioned it containing 2 classes.&nbsp; One class is the Monitor
class and one is the Worker class.&nbsp; The Monitor's responsibility would
be coordinating the Workers since there can be multiple workers running
on the same client.&nbsp; The monitor would coordinate tasks such as
watching for activity from the workers (i.e. update the output from
workers as it comes in) and also the monitor needs to be able to
prematurely end a workers task if the job is marked as unnecessary.&nbsp; <br>The workers of course have to submit their results back to the server, but in the system I envisioned the monitor takes care of that by continuously polling the status of the workers.
<br><br>You're right in that this system complicates things since now I have to handle communication between the client and the server, and on the client side I need to implement communication protocols between the monitor and the worker.&nbsp; However, it does seem to buy me some flexibility.&nbsp; Also, this will keep the Worker class quite simple since all it actually does it execute an external program to do it's job. 
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Without a more concrete description I'm afraid I don't have much more<br>useful to add.
</blockquote><div><br>I hope this clears it up some more and am looking forward to your feedback.&nbsp; I think the most difficult problem I am facing right now is to decide on a good design.&nbsp; This is kind of vague in text and I hope to be able to show you some code soon, when I figure out how to publish a mercurial repository :) 
<br><br>Thanks,<br>Yi</div></div><br>