[Twisted-Python] PBClientFactory and getRootObject

2009-04-02 Thread Fabrizio Mancini
Hi everyone, I'm writing a server and a client using Perspective Broker with no Avatar and no auth. The server accumulates some data using a DeferredQueue. The clients using a remote call retrieve one item per time from the queue and elaborates it making some changes on a database using adbapi. Wha

[Twisted-Python] twisted and logging

2009-04-03 Thread Fabrizio Mancini
Hi, i'm using the package twisted.python.log to log messages. Till now, it's all ok, but with the standard logging package from python i had setup a logging system that logged normal logs to one file, error logs to a separete files, and some special operations to one other file. Every logging insta

Re: [Twisted-Python] PBClientFactory and getRootObject

2009-04-10 Thread Fabrizio Mancini
On Fri, Apr 10, 2009 at 6:09 PM, Jean-Paul Calderone wrote: > I don't really understand either of these questions. > Hi JP, and thank you for your reply. Don't worry if you didn't understand the question, i just didn't understand deeply how deferred worked. I just needed to chain different deferr

[Twisted-Python] handling CTRL-C

2009-04-30 Thread Fabrizio Mancini
Hi, i know twisted already manage CTRL-C keystroke, but i'd like to add some other action when CTRL-C is pressed. I've implemented a perspective broker server, which have a DeferredQueue and a lot of elements in it. I'd like to write to a file all those elements before the program shuts down. Is th

Re: [Twisted-Python] handling CTRL-C

2009-04-30 Thread Fabrizio Mancini
On Thu, Apr 30, 2009 at 3:04 PM, Itamar Shtull-Trauring wrote: > On Thu, 2009-04-30 at 14:44 +0200, Fabrizio Mancini wrote: >> Hi, >> i know twisted already manage CTRL-C keystroke, but i'd like to add >> some other action when CTRL-C is pressed. >> I've im

Re: [Twisted-Python] handling CTRL-C

2009-04-30 Thread Fabrizio Mancini
> The best way is to have an IService provider with a stopService method > which does whatever shutdown cleanup you want done, possibly returning > a Deferred which doesn't fire until it has finished.  However your app > is shut down, this will cause your cleanup code to run. Thank you, i will stu

[Twisted-Python] subclassing and mixing protocol.ReconnectingClientFactory and pb.PBClientFactory

2009-04-30 Thread Fabrizio Mancini
Hi, i've implemented a pb client by writing a class which inherits from object and a class which inherits from ReconnectingClientFactory and PBClientFactory. Till now it's all ok, the client detects the disconnection and try to reconnect with an exponential delay if the connection is not immediatly

Re: [Twisted-Python] PB vs JMS

2009-10-08 Thread Fabrizio Mancini
> > Thank you Drew. > I should have sketched a bit more: I have to compute many > self-contained jobs and then elaborate their results. > Jobs are distributed to many machines and results are sent back to > the Master. The Master should not wait for all the results to be ready > but should start