Re: [Twisted-Python] Thread Consumption Problem in Daemon?

2018-11-23 Thread Darren Govoni
Thanks. I added Tipper to my program and will see what it shows when I ping the process. https://pypi.org/project/tipper/ On Thu, Nov 22, 2018 at 6:43 AM Chris Withers wrote: > On 22/11/2018 02:30, Glyph wrote: > > > >> On Nov 19, 2018, at 6:16 AM, Darren Govoni &

Re: [Twisted-Python] Thread Consumption Problem in Daemon?

2018-11-19 Thread Darren Govoni
ote: > >> On maandag 19 november 2018 12:40:20 CET Darren Govoni wrote: >> > Hi, >> > I am using twisted to run my Flask app via WSGI like so. >> > >> > twistd --pidfile $PORT/pidfile -l $PORT/logfile -n web --port >> > tcp:$PORT --wsgi my.

[Twisted-Python] Thread Consumption Problem in Daemon?

2018-11-19 Thread Darren Govoni
Hi, I am using twisted to run my Flask app via WSGI like so. twistd --pidfile $PORT/pidfile -l $PORT/logfile -n web --port tcp:$PORT --wsgi my.app Naturally, I have functions representing routes that enter and exit just fine. However, I notice the twisted daemon process is :"gathering threads

Re: [Twisted-Python] Synchronous byte streaming

2010-03-07 Thread Darren Govoni
Many thanks! I will try it. On Sun, 2010-03-07 at 15:19 +, exar...@twistedmatrix.com wrote: > > You want to make your client use the producer/consumer APIs. You can > find some docs here: > > > http://twistedmatrix.com/documents/current/core/howto/producers.html

[Twisted-Python] Synchronous byte streaming

2010-03-07 Thread Darren Govoni
Hi, I received some great advice in the past about using Int32StringReceiver to be able to send a reliable message of bytes from the client to the server without hassling with unordered or partial messages. Seems to work. But I have one problem. My client iterates over a file sending 7MB byte me

Re: [Twisted-Python] multiprocessing capability?

2010-02-25 Thread Darren Govoni
Thank you for that clarification. On Thu, 2010-02-25 at 19:54 -0600, Christopher Armstrong wrote: > On Thu, Feb 25, 2010 at 7:33 PM, Darren Govoni wrote: > > What you refer to is different than what I need. The real 'Process' > > implementation is new to Python 2.6 &

Re: [Twisted-Python] multiprocessing capability?

2010-02-25 Thread Darren Govoni
r similar, that _would_ use Python's new support for OS processes. Someone wrote a wrapper to this on the net, but I was curious if this will be supported in Twisted. Darren On Fri, 2010-02-26 at 01:13 +, Johann Borck wrote: > Darren Govoni wrote: > > The nice thing about usin

Re: [Twisted-Python] multiprocessing capability?

2010-02-25 Thread Darren Govoni
ighly efficient, symmetric, network based > parallelism, with fault tolerance thrown in for free. > > My point here is that there are other ways to go about exploiting > symmetric multiprocessor machines, even banks of them, that neither > require threads, nor the multiprocessing pac

Re: [Twisted-Python] multiprocessing capability?

2010-02-24 Thread Darren Govoni
Looks interesting. I'm going to check out that package. My original request was more along the lines of using Python's new support for native CPU core's and processes (the multiprocessing package is for this). Python's built-in thread support has global lock constraints that underperform in some

Re: [Twisted-Python] [ANNOUNCE] Twisted 10.0.0pre1 is now released

2010-02-21 Thread Darren Govoni
Hi, This is great! Is there a list of new features or improvements for this release? I'd like to start planning my update. Darren On Sun, 2010-02-21 at 21:50 -0500, Jonathan Lange wrote: > Live from PyCon Atlanta, I'm pleased to herald the approaching > footsteps of the 10.0 release. > > Tar

[Twisted-Python] multiprocessing capability?

2010-02-21 Thread Darren Govoni
Hi, I looked at the source for the threads module and wondered if the current Twisted supports Python's (2.6) multiprocessing threading? If not, is there a stable package somewhere that patches Twisted to support this? I saw one from last summer but not sure if its stable. Thanks! Darren ___

Re: [Twisted-Python] Streaming File Transfer Protocol?

2010-02-19 Thread Darren Govoni
Ignore me. There was a lag, but it worked. Thanks. On Fri, 2010-02-19 at 13:38 -0500, Darren Govoni wrote: > H. I set self.MAX_LENGTH in my subclass > (self.MAX_LENGTH=7376896) but still no callback happens to > strongReceived. Also, the connection is not lost. > > Its

Re: [Twisted-Python] Streaming File Transfer Protocol?

2010-02-19 Thread Darren Govoni
H. I set self.MAX_LENGTH in my subclass (self.MAX_LENGTH=7376896) but still no callback happens to strongReceived. Also, the connection is not lost. Its like it doesn't notice it on the server, while the client writes successfully. Still investigating. On Fri, 2010-02-19 at 13:12 +,

Re: [Twisted-Python] Streaming File Transfer Protocol?

2010-02-19 Thread Darren Govoni
Jean-Paul, Thank you for this tip! I will try it. Much appreciated. Darren On Fri, 2010-02-19 at 13:12 +, exar...@twistedmatrix.com wrote: > On 11:33 am, dar...@ontrenet.com wrote: > >Hi again, > > Ok, so now it seems the Int32StringReceiver does not receive > >"stringReceived" events i

Re: [Twisted-Python] Streaming File Transfer Protocol?

2010-02-19 Thread Darren Govoni
t there is not one stringReceived callback on the server side of the protocol. No error or exception. nothing. Is this normal behavior? thanks, Darren On Sat, 2010-02-13 at 20:22 -0500, David Bolen wrote: > Darren Govoni writes: > > > I spoke too fast. But pardon my noobiness. >

Re: [Twisted-Python] reactor.run hangs

2010-02-14 Thread Darren Govoni
I believe reactor.run() never returns and always blocks the calling thread until reactor.stop() is called, afterwhich you cannot call reactor.run() again. Not sure if that helps you though. On Sun, 2010-02-14 at 22:36 +0100, giskard wrote: > Hi all, > > i think i'm not doing things in the right

Re: [Twisted-Python] Streaming File Transfer Protocol?

2010-02-13 Thread Darren Govoni
Thanks. I'm a shameless noob On Sun, 2010-02-14 at 10:08 +1100, Andrew Bennetts wrote: > Darren Govoni wrote: > [...] > >2) Can I force twisted to send ALL the bytes I issue in the write without > >re-thinking TCP or forcing me to re-implement

Re: [Twisted-Python] Streaming File Transfer Protocol?

2010-02-13 Thread Darren Govoni
the bytes I issue in the write without re-thinking TCP or forcing me to re-implement TCP? thanks! Darren On Wed, 2010-02-10 at 18:34 -0500, Darren Govoni wrote: > Thanks for that explanation David. Makes sense! > > On Wed, 2010-02-10 at 16:01 -0500, David Bolen wrote: > > >

Re: [Twisted-Python] Streaming File Transfer Protocol?

2010-02-10 Thread Darren Govoni
Thanks for that explanation David. Makes sense! On Wed, 2010-02-10 at 16:01 -0500, David Bolen wrote: > Darren Govoni writes: > > >>From what I learned in other posts, the dataReceived(self, data): in the > > Echo server > > will get called with out-of-order dat

Re: [Twisted-Python] Streaming File Transfer Protocol?

2010-02-10 Thread Darren Govoni
t; self.transport.write(data) > > > def main(): > """This runs the protocol on port 8000""" > factory = protocol.ServerFactory() > factory.protocol = Echo > reactor.listenTCP(8000,factory) > reactor.run() > > # this

Re: [Twisted-Python] Streaming File Transfer Protocol?

2010-02-10 Thread Darren Govoni
es delivery and ordering. > > Mark > > > On Wed, Feb 10, 2010 at 12:22 PM, Darren Govoni > wrote: > > Hi, > Is there an existing protocol that can provide the > following? > > - Accept stream binary data FROM a client (e.g

[Twisted-Python] Streaming File Transfer Protocol?

2010-02-10 Thread Darren Govoni
Hi, Is there an existing protocol that can provide the following? - Accept stream binary data FROM a client (e.g. very large file transfer) - Receive data IN ORDER (i.e. stream. not out of order random packets) I want to stream FROM a client to the protocol server and have the server process th

Re: [Twisted-Python] Sending a stream via Protocol?

2010-02-06 Thread Darren Govoni
On Sat, 2010-02-06 at 17:13 +, exar...@twistedmatrix.com wrote: > On 04:42 pm, dar...@ontrenet.com wrote: > >Hi, > > I have a simple protocol listening on a port. I send it a text message > >(a filename) > >and the protocol tries to stream back the bytes of the file. Mostly, > >this works > >

[Twisted-Python] Sending a stream via Protocol?

2010-02-06 Thread Darren Govoni
Hi, I have a simple protocol listening on a port. I send it a text message (a filename) and the protocol tries to stream back the bytes of the file. Mostly, this works but in some cases, the receiving side receives less bytes than is written by: self.transport.write(bytes) I read the API which

[Twisted-Python] Changing threadpool size in reactor

2009-08-06 Thread Darren Govoni
Hi, I could see from the docs I read how to increase the allotted threads in the reactor. I use reactor.callInThread() and it seems to max out at 10. I read about ThreadPool class, but need to run mine in the reactor. thanks for any tips and sorry if it was more obvious than i could see.

Re: [Twisted-Python] spawning tasks after reactor?

2008-12-31 Thread Darren Govoni
It works now. Sorry for the extra post. On Wed, 2008-12-31 at 15:08 -0500, Darren Govoni wrote: > Hi, > Thanks for that suggestion. It looks very close to what I need. I > tried doing it _after_ the reactor is run and it did not execute. Here > is a code snippet. > > def

Re: [Twisted-Python] spawning tasks after reactor?

2008-12-31 Thread Darren Govoni
x27;t work. I'm probably missing an argument or something. Thanks for any tips. Much appreciated. Darren On Wed, 2008-12-31 at 11:16 -0500, Jean-Paul Calderone wrote: > On Wed, 31 Dec 2008 10:51:38 -0500, Darren Govoni wrote: > >Hi Jean-Paul, > > Thank you for those suggesti

Re: [Twisted-Python] spawning tasks after reactor?

2008-12-31 Thread Darren Govoni
t I'd like is something like reactor.callNow(...) that doesn't block and invokes the generator in a thread pool. Thanks for any tips! Awesome package. Darren On Wed, 2008-12-31 at 10:17 -0500, Jean-Paul Calderone wrote: > On Wed, 31 Dec 2008 09:37:26 -0500, Darren Govoni wrote:

[Twisted-Python] spawning tasks after reactor?

2008-12-31 Thread Darren Govoni
Hi, I'm new to twisted and have a simple question. I want to run a threaded server that monitors a remote service and spawns queued/threaded tasks as it finds messages. I'm having trouble understanding how to do this after a reactor is running since the tasks are not set up before reactor.run().