[Twisted-Python] Scaling problem

Itamar Shtull-Trauring itamar at itamarst.org
Tue Nov 4 17:49:15 MST 2003


On Tue, 4 Nov 2003 16:21:46 -0800 (PST)
Nathan Seven <scosol at yahoo.com> wrote:

> Am I severely confused here?
> The entire point of Twisted (to me anyway) seems to be
> to  provide non-blocking interfaces to long-running
> and/or blocking resources.

Long-running yes, blocking, no. There is no magic way to make a blocking
API not-block. So you need to either rewrite from scratch, or use
threads.

For example, "send an email and return success or failure" can be
written using non-blocking APIs, since sockets have non-blocking APIs.
Calling a DB-API database adapter's cursor.fetchall() method can not
(unless you want to rewrite the database's wire protocol).

-- 
Itamar Shtull-Trauring    http://itamarst.org/
Available for Python & Twisted consulting




More information about the Twisted-Python mailing list