[Twisted-Python] RTFM about custom reactors

andrewfr_ice at yahoo.com andrewfr_ice at yahoo.com
Tue May 5 07:42:48 MDT 2009


Message: 3
Date: Mon, 4 May 2009 02:15:25 -0400
From: Mohamed Lrhazi <lrhazi at gmail.com>
Subject: [Twisted-Python] RTFM about custom reactors
To: twisted-python at twistedmatrix.com
Message-ID:
    <c4ab18df0905032315m4f0b3f85vf900adddd7557000 at mail.gmail.com>
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
 







      




More information about the Twisted-Python mailing list