RE: [Twisted-Python] RE: Question about Descriptors and SelectReactor
Hi Glyph and Folks: AM>I would be actually quite curious to know the rationale of choosing AM>select() over epoll() these days. epoll() scales like O(1) with the AM>number of file descriptors, it is very performant, stable, and has no AM>limitation on the overall number of fds on linux (except for your /proc AM>and ulimit -n settings). I'd use epoll reactor, unless you have some AM>very specialized requirement. G>Short answer: because select() is always available. Thanks. I do most development in Linux now. The main thing I wanted to avoid was altering file descriptor limits and bundling a new AMI and still not having the ability to test above a certain descriptor limit. After the semester is over, I want to conduct some new tests with Stackless Python and Twisted. I am also playing with new designs. I am interested in comparing Stackless/Twisted solutions to pure Twisted solutions (just to gauge of inefficiencies). I am particularly interested in how channel preferences (a Stackless scheduling mechanism) affect certain performance metrics depending on the number of (and I guess duration) of connections. I will probably start looking at Reactor code again. This is why in the donate time thread, I was willing to volunteer time there (if I can actually be of help) Cheers, Andrew ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] RTFM about custom reactors
Message: 3 Date: Mon, 4 May 2009 02:15:25 -0400 From: Mohamed Lrhazi Subject: [Twisted-Python] RTFM about custom reactors To: twisted-python@twistedmatrix.com Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Hi Mohamed: >I was wondering if someone could point me in the right direction >I am attempting to connect a proprietary network OS plugin system to >Python, to allow for writing traffic handling plugins in Python, and >was wondering what it would take to connect such a system into >Twisted, thus allowing the writing of normal twisted apps on top >Is it matter of learning and writing a custom reactor? My current >understanding is that the reactor is what detects and dispatches >events... but does it also dispatch the "data", as in the traffic >payload? what can I read to learn more? I strongly suspect what you want to implement is a custom protocol rather than a custom reactor. Look at that first. Based on past e-mail and examples, I believe the rule of thumb is one writes a custom reactor if you are porting to a new operating system/or taking advantage of some specific OS feature. There are exceptions like wxReactor that is to make Twisted interoperate with a windowing system but there functions that make the regular reactor interoperate with those systems. Cheers, Andrew ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python