[Twisted-Python] Life cycle of ApplicationServices

I'm writting a FIX (Financial Information Exchange) application with Twisted with the target to compete with quickfix. I'm very close, everything is perfect except the way to control life cycle of services. Let's take an example : The FIX main application is an engine able to manage many FIX sessions and is controled by web services. A session may act as a TCP server or client. Sessions have starting time and stopping time. For a client session I'm using a protocol.ReconnectingClientFactory. With Twisted-2.0.1 there is no way to stop properly a service and there is no way to destroy (factory, protocol, connector, ...) associated to the service. Does someone have solutions about clean life cycle management ? regards. eric basley

On Tue, 2005-10-25 at 15:03 +0200, Eric Basley wrote:
Services (I assume you're using twisted.application.service here) are meant typically for "persistent" objects, encapsulating a specific system's business logic. In some cases this might be a thin wrapper around factory, but if you are opening many short-lived connections you probably don't want to encapsulate as a service. For example, a Web crawler might be a service - you can start and stop it, configure where it goes; the specific HTTP connections it manages shouldn't be services.

On Tue, 2005-10-25 at 15:03 +0200, Eric Basley wrote:
Services (I assume you're using twisted.application.service here) are meant typically for "persistent" objects, encapsulating a specific system's business logic. In some cases this might be a thin wrapper around factory, but if you are opening many short-lived connections you probably don't want to encapsulate as a service. For example, a Web crawler might be a service - you can start and stop it, configure where it goes; the specific HTTP connections it manages shouldn't be services.
participants (2)
-
Eric Basley
-
Itamar Shtull-Trauring