[Twisted-Python] Twisted Allen-Bradley PLC Protocol

Glyph Lefkowitz glyph at divmod.com
Tue Mar 8 20:58:57 EST 2005

Paul Campbell wrote:

> So, does this make any sense? What is the "design pattern" in this case in
> twisted?

It depends: Twisted really ought to provide some layer-factoring code in 
the core, but it doesn't, so to some extent you're on your own.

However, if there is no official "design pattern", there are certain 
trends which have been repeating themselves.  Twisted's 
twisted.application.strports and twisted.spread.pb, as well as Divmod's 
mantissa.q2q, seem to all be taking the approach of: build one, 
high-level API that allows you to do a complete end-to-end connection 
conveniently with one line of code, and provide at least some basis for 
abstracting the components of that line so that they can be plugged in.

PB's method is "login", strports has 'service' and 'listen', and Q2Q has 

More information about the Twisted-Python mailing list