[Twisted-Python] Need Exception that will stop ther reactor within twistd
glyph at divmod.com
glyph at divmod.com
Fri Dec 1 21:11:33 EST 2006
On 30 Nov, 08:00 pm, ncesar at lunix.com.ar wrote:
>my apologies for the delayed answer, i've been very busy latelly.
No problem, aren't we all.
>El Martes, 28 de Noviembre de 2006 06:07, glyph at divmod.com escribió:
>> Should the webserver stop simply because your protocol is not working?
>Well, yes I agree with you: not a webserver. So, I'll shortly describe my
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.
>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
OK. So somewhere, there should be a MultiLTSPService which is the thing that gets stopped by these exceptions, I think.
>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 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? I understand that this is a "panic" state that should "never happen", but you can flush that one bit of state without tanking the entire process.
>There are serveral services involved in this application (the multicast UDP
>protocol, a shell, the ip_queue reader and others), but a major problem as
>stated above MUST get the application down with some special clean up.
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.
>Glyph, I hope you understand my rustic English in the explanation above. Any
>advice or suggestion please respond this email.
It's not too bad :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python