[Stackless] The case for Twisted
radix at twistedmatrix.com
Sat Aug 11 22:57:53 CEST 2007
On 8/11/07, Andrew Francis <andrewfr_ice at yahoo.com> wrote:
> Hello Colleagues:
> >There are also, of course, many opportunities for
> >integration at a higher level, like being able >to
> "block" on Deferreds,
> My current implementation blocks on deferreds.
Sorry for not acknowledging this immediately. I did know you did that,
and I know it's possible since I wrote simple Deferred integration
years ago, as I think you're aware :-)
> or giving a stackless API to >the Twisted protocol
> system, and so forth. This is
> >great, but I understand some people may not want
> >something so high-level.
> Christopher, I disagree. I believe most programmers
> just want solutions and would be more than happy to
> work with high level abstractions that save them time
> and get the job done.
At the same time, many people are intent on wasting time on
implementing low-level things. :) I think you've mistaken the intent
of my email. I'll describe below.
> From the little that I have seen
> in the Twisted mailing list, beginners have problems
> understanding deferreds.
> I don't see why a decent Stackless/Twisted integration
> could not allow the following:
> import StacklessTwistedClient as client
> result = client.getPage(....)
> except TwistedError:
> # do something
> and let the underlying machinery (most likely a
> modified reactor) take care of stuff like deferreds. I
> believe that Stackless combined with Twisted can
> provide a nice alternative to "stack ripping"
I totally agree! I made my original post about using the low level
features of Twisted as an alternative to the ideas I'd heard on the
stackless list about implementing a custom low-level event loop. I
don't want to encourage people to use *only* the low level features of
Twisted; I just want to make sure people at least use those instead of
A very high level API such as the one you've described is desirable
(in fact, I would imagine your Deferred integration should pretty much
already do this, given there's already a client.getPage which returns
International Man of Twistery
Stackless mailing list
Stackless at stackless.com
More information about the Stackless