[Twisted-Python] Components

Bob Ippolito bob at redivi.com
Thu Feb 26 15:41:01 EST 2004

On Feb 26, 2004, at 3:22 PM, Christopher Armstrong wrote:

> James Y Knight wrote:
>> This page 
>> <http://peak.telecommunity.com/protocol_ref/protocols-context.html> 
>> describes how one would do context-specific protocols with 
>> PyProtocols, which *doesn't* seem to allow multiple registries. 
>> Basically, it seems to say: use a per-instance subprotocol. It may 
>> not be directly applicable to twisted, because of the lack of chained 
>> adaptation (A->B and B->C gives you A->C automatically), but it does 
>> seem to me like a nice way to go about it.
> Hmm... I'm reading that page, but I can't tell if it requires the 
> framework code to do special things to support context-specific 
> adapters. If it does, is there any way to implement context-specific 
> adapters that _don't_ require framework-code to know about them? i.e., 
> so plain old adaptation calls will look in the context for adapters?
> But yeah, if PyProtocols does everything we need and there's a good 
> chance it will support our future crazy ideas, I think it's a good 
> idea to switch. We'd probably wanna bump to 2.0 for such a switch. 
> maybe?
> Of course, IIRC glyph mentioned it being slow, and I think he doesn't 
> like the implicit adaptation. ?

Did he benchmark it?  Last I checked, t.p.components and january 
molasses are neck in neck ;)  PyProtocols has written-in-C code for 
acceleration, I bet it wins, even though it does do more work (which I 
believe happens *up front*, so doesn't really affect runtime 
performance) with transitive adaptation.


More information about the Twisted-Python mailing list