[Twisted-Python] Understanding Deferreds/callback further

Yi Qiang yqiang at gmail.com
Tue Nov 7 19:07:48 EST 2006

On 11/3/06, Phil Mayers <p.mayers at imperial.ac.uk> wrote:
> Yi Qiang wrote:
> > This is the part where I stumble on though, the exact implementation of
> > how to make it so that one calls back the other.
> One what calls back the other what?
> You'll have issues with error handling and dropping workers if you're
> not careful to chain the deferreds correctly. I would try something like
> this personally. ...

Hi Phil,
Sorry it took me so long to get back to you.  Thanks for your suggestion,
but the thing I was trying to avoid is to have the Workers communicate with
the PB server.  There could be potentially many workers and when I thought
about the problem, it seemed cleaner to design something where the client
consisted of a 'Monitor' and 'Workers'.  The monitor connects to the server,
gets jobs, distributes jobs to the workers and watches for workers who
finished their jobs.  What do you think of this design?  It is obviously a
little more convoluted to program but might be easier to deal with in the
future.  I have little programming experience so this is all speculation
from my side.  Any insight would be greatly appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20061107/a08bb110/attachment.htm 

More information about the Twisted-Python mailing list