[Twisted-Python] Need Exception that will stop ther reactor within twistd

Nicolas D. Cesar ncesar at lunix.com.ar
Mon Dec 4 14:56:00 EST 2006

El Viernes, 1 de Diciembre de 2006 23:11, glyph at divmod.com escribió:
> On 30 Nov, 08:00 pm, ncesar at lunix.com.ar wrote:
> My point is that you are artificially combining your application with your
> infrastructure.  The reactor is always potentially in use by multiple
> applications, so it is not the thing that should be stopped.

That's new to me! is there any documentation on "multiple applications" 

> >I have multiple LSTP (Linux Terminal Server Project) servers. All servers
> > are (almost) the same, and any of them can serve any client. There are
> > arround 8-12 servers and 150+ clients. I'm developing a twisted
> > application that balances clients requests (by filtering DHCP
> > discover/requests packets. (I attached an image, my application is called
> > multiltsp). I'm using ip_queue for this.
> OK.  So somewhere, there should be a MultiLTSPService which is the thing
> that gets stopped by these exceptions, I think.

I have a t.a.service.MultiService() serving all this inside an 
t.a.service.Application, where should I write the "try:.. except:" code? 

> >There is a LDAP somewhere that has all client MACs that are in the group
> > (eg. the 150 clients) and from time to time, multiltsp re-reads this
> > list. (I'm simplifying much of these details). I'll call this list
> > "ALL-MACS"... ... all multiltsp daemons MUST have the ALL-MACS list
> > identical, in case there is a out of sync[1] problem the (incorrect)
> > server must quit and the others must handle the clients.
> Shouldn't it just get informed that it is in an invalid state, and re-start
> itself, rather than shutting down entirely?  

Rebuilding your house won't stop the hurricane :-) re-starting won't bring it 
to a correct state, just because it's a problem from outside, usually 
asociated with a (sysadmin) human action. I need the process to stop (and 
send some mails) so it can be fully reparied with qualified supra-sysadmins. 
The MultiLTSP server can't be a zombie forever... But then again, i'm new to 
twisted (less than 5 month) and probably i'm misunderstanding twisted's 

> So there needs to be an object that represents the "whole application",
> which has references to all these services.  The reactor should not be
> serving that purpose.

I thought the main quit() was the reactor.stop(), my teachers were tutorials, 
is there any cleaner way to quit. There is a t.a.service.Application() should 
be used for this? should be used ANOTHER object?

Nicolás D. César <ncesar at lunix.com.ar>
Lunix S.R.L. -[ http://www.lunix.com.ar ]-
GnuPG Public Key: gpg --keyserver wwwkeys.pgp.net --recv-key 0x3606F3E6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20061204/3e08c545/attachment.pgp 

More information about the Twisted-Python mailing list