Re: [Twisted-Python] Stopping Reactor in UnitTest Callback

2013-01-25 Thread Fabian Rothfuchs
Hey Jean-Paul (and all the others in this thread), Thank you very much for your help so far - I do really appreciate it! I'm well aware of the fact that `deferLater` does not magically turn blocking apps to non-blocking ones. The idea is, whatever SUDS does, in the end it should send a SOAP reque

Re: [Twisted-Python] Stopping Reactor in UnitTest Callback

2013-01-24 Thread Fabian Rothfuchs
erver sent the response. When trying to connect to the server via telnet, I do not get any response unless the suds connection is lost. Snippets: TestCase: http://dpaste.org/pmg6Y/ TestServer: http://dpaste.org/NOLb8/ Client: http://dpaste.org/2wxIV/ Thanks for any help! Fabian From: Fabian

Re: [Twisted-Python] Stopping Reactor in UnitTest Callback

2013-01-15 Thread Fabian Rothfuchs
ping Reactor in UnitTest Callback On Sat, Jan 12, 2013 at 9:00 AM, Fabian Rothfuchs wrote: > I'm in the dilemma of using both - Django and Twisted. > My goal is to have Django initialising the test (python manage.py test > ), instead of trial, as it will setup the whole test environm

Re: [Twisted-Python] Stopping Reactor in UnitTest Callback

2013-01-12 Thread Fabian Rothfuchs
I'm in the dilemma of using both - Django and Twisted. My goal is to have Django initialising the test (python manage.py test ), instead of trial, as it will setup the whole test environment (I.e. Creates a db copy, allows per-model testing, follows certain conventions, etc). As to that I'm trying

Re: [Twisted-Python] dataReveived() buffer best practice?

2011-10-06 Thread Fabian Rothfuchs
On 10/6/11 11:06 PM, "exar...@twistedmatrix.com" wrote: >On 04:22 pm, fabian.rothfu...@googlemail.com wrote: >>Hey there, >> >>I'm currently implementing a Telnet Client, which is actually talking >>to a >>Console Server mapping Telnet to an RS232 interface. >> >>[snip] >> >>and this is the res

[Twisted-Python] dataReveived() buffer best practice?

2011-10-06 Thread Fabian Rothfuchs
Hey there, I'm currently implementing a Telnet Client, which is actually talking to a Console Server mapping Telnet to an RS232 interface. Further I'm using Twisted's conch.telnet lib to build that client, and I got a little situation here where I wonder if there's already a best practice. I guess

Re: [Twisted-Python] Twisted-Python Digest, Vol 90, Issue 16

2011-09-20 Thread Fabian Rothfuchs
ld be nice to read something about(doesn't make much sense to me yet). All i know is that i used a single-threaded wsgi thing to make the autoreload functionality work(useful for webdevving). cheers, Jeroen 2011/9/20 Fabian Rothfuchs > Hey Jeroen, > > As I learned so far, using WS

Re: [Twisted-Python] Twisted-Python Digest, Vol 90, Issue 16

2011-09-20 Thread Fabian Rothfuchs
er if im using it the right way? (https://github.com/phrearch/hwios/blob/master/services/web_ui/service.py) cheers, Jeroen 2011/9/20 Glyph Lefkowitz > > On Sep 20, 2011, at 1:12 PM, Fabian Rothfuchs wrote: > >> I feel quite happy with that solution till now (planning since 4 hours and &

Re: [Twisted-Python] Twisted-Python Digest, Vol 90, Issue 16

2011-09-20 Thread Fabian Rothfuchs
>>> >>>If you can afford to make the change, running twisted as a completely >>> separate service in another process, and implementing communication >>> between your Django server and your twisted server via a protocol might >>> simplify things a bit in terms of coordination. >> >> This is exactly

Re: [Twisted-Python] Twisted-Python Digest, Vol 90, Issue 16

2011-09-20 Thread Fabian Rothfuchs
Hi Daniel, >Sorry for any confusion, but I never said anything about using twisted as > >a WSGI container for purposes of ensuring thread-safety. I was only >responding to your question about "how to wrap Django in twisted", and >running Django inside twisted's WSGI container is one way to do th

Re: [Twisted-Python] Protection against flooding

2011-09-20 Thread Fabian Rothfuchs
On 20/09/2011 17:11, Fabian Rothfuchs wrote: In your Protocol, I would implement a specific Error that might be returned by the server in such burst situations. The clients should interpret that error in a way that lets them reconnect to the server after a rand

Re: [Twisted-Python] Protection against flooding

2011-09-20 Thread Fabian Rothfuchs
In your Protocol, I would implement a specific Error that might be returned by the server in such burst situations. The clients should interpret that error in a way that lets them reconnect to the server after a randomly chosen interval. This way you immediately eliminate the burst without running

Re: [Twisted-Python] Twisted-Python Digest, Vol 90, Issue 16

2011-09-20 Thread Fabian Rothfuchs
As Twisted points out not to be thread-safe, why would it be in WSGI? Due to the sensibility of the project I cannot afford things to go wrong because of not synchronized threads or other pitfalls, so I actually decided to to the asynchronous way, and this bites with WSGI. Fabian On 9/19/11 10:

Re: [Twisted-Python] Twisted-Python Digest, Vol 90, Issue 16

2011-09-19 Thread Fabian Rothfuchs
So JP, Having the reactor running in a first thread and *all* the rest in a second one is alright, if the second one calls the reactor via callFromThread() ? Elsewise, I need to find out how to wrap Twisted around Django… hum… Fabian On 9/19/11 9:53 PM, "exar...@twistedmatrix.com" wrote: >

Re: [Twisted-Python] Twisted-Python Digest, Vol 90, Issue 16

2011-09-19 Thread Fabian Rothfuchs
: Twisted general discussion Subject: Re: [Twisted-Python] Twisted-Python Digest, Vol 90, Issue 16 On Sep 19, 2011, at 3:02 PM, Fabian Rothfuchs wrote: > Well no, not from multiple threads. > I have only two threads ­ one main thread, which is the Django framework, and > one detached

Re: [Twisted-Python] Twisted-Python Digest, Vol 90, Issue 16

2011-09-19 Thread Fabian Rothfuchs
threading themselves. Is this 'allowed' ? Fabian From: Glyph Lefkowitz Reply-To: Twisted general discussion Date: Mon, 19 Sep 2011 14:16:56 -0400 To: Twisted general discussion Subject: Re: [Twisted-Python] Twisted-Python Digest, Vol 90, Issue 16 On Sep 19, 2011, at 2:03 PM, Fabian

Re: [Twisted-Python] Twisted-Python Digest, Vol 90, Issue 16

2011-09-19 Thread Fabian Rothfuchs
>One thing you can do is make a small initial startup method that >you supply to reactor.callLater with a delay of 0, that does the loop on >the connectTCP()'s. It will start up your initial set of connections. Thanks John, this was *really* helpful! I now did the following: 1. On Startup, the ap

[Twisted-Python]

2011-09-19 Thread Fabian Rothfuchs
Hi Guys, I'm relatively new to Twisted (as the most questioners I guess). Without providing tons of distracting details, this is where I'm stuck w/ Twisted: I currently build a server application that consists of a set of client adapters, which (among others) use Telnet as transport protocol ­ so