[Web-SIG] Async API for Python

Jerry Spicklemire jspicklemire at gmail.com
Thu Aug 14 16:11:17 CEST 2008


Sorry, if this turns up twice ...

Phillip J. Eby wrote, on Tue Jul 29 03:21:18 CEST 2008:

"There is no async API that's part of WSGI itself, and it's
unlikely there will ever be one unless there ends up
being an async API for Python as well."

http://mail.python.org/pipermail/web-sig/2008-July/003547.html


Following up, perhaps this would be of interest:

"New PEP proposal: C Micro-Threading"

"This PEP adds micro-threading (or 'green threads')
at the C level so that micro-threading is built in and
can be used with very little coding effort at the python
level.

The implementation is quite similar to the Twisted
Deferred_/Reactor_ model, but applied at the C level
by extending the C API slightly.  Doing this provides
the Twisted capabilities to python, without requiring
the python programmer to code in the Twisted event
driven style. Thus, legacy python code would gain
the benefits that Twisted provides with very little
modification.

Burying the event driven mechanism in the C level
should also give the same benefits to python GUI
interface tools so that the python programmers don't
have to deal with event driven programming there
either.

This capability may also be used to provide some
of the features that Stackless Python provides,
such as microthreads and channels (here, called
micro_pipes)."

http://mail.python.org/pipermail/python-ideas/2008-August/001788.html

At first glance, the brilliant bit seems to be that
the existing Python exception handling process
would be applied to async operations, without
requiring a "Twisted" coding style.

BTW, the PEP author, Bruce Frederiksen, is the author
who presented at PyCon, in Chicago, about PyKE, his
Python Knowledge Engine project, that makes
"compilable" much of what is done dynamically in
many popular Python Web Frameworks. The potential
to address the "Python is Slow!" meme may be
significant, as seen here:

http://groups.google.com/group/pyke/browse_thread/thread/433dd213e581536f

Just a "heads up" from a longtime lurker,
Jerry Spicklemire
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/web-sig/attachments/20080814/fcf69bae/attachment.htm>


More information about the Web-SIG mailing list