Standard Asynchronous Python

Bryan bryanjugglercryptographer at yahoo.com
Sun Sep 16 02:45:33 EDT 2012


Dustin J. Mitchell wrote:
> Thanks for the second round of responses.  I think this gives me some
> focus - concentrate on the API, talk to the framework developers, and
> start redrafting the PEP sooner rather than later.

That's mostly what you came in with, but talking to the framework
developers is unarguably a good idea. So what frameworks?

There is one great framework for asynchronous Python and that's
Twisted. I'm not a Twisted guy... well not in the sense at issue here.
I can tell you why Twisted is "massive": no workable alternative. An
event-driven framework cannot simply call methods in a mainstream
Python library because they often block for I/O. The good and gifted
developers of Twisted have risen to the challenge by re-writing
important libraries around their deferreds which they regard as
beautiful.

Our fellow scripting language programmers in the young node.js
community work in a system that is event-driven from the ground up.
They had the advantage of no important blocking sequential libraries
to re-write. As a programming language JavaScript is grossly inferior
to Python, yet the node.js guys have put out some useful code and
impressive benchmarks with their bad-ass rock-star tech.
https://www.youtube.com/watch?v=bzkRVzciAZg

The obvious exemplars among Python frameworks are web frameworks.
Developers of the most popular Python web framework, Django, famously
stated their goal of making making web programming "stupidly easy".
That registered with me. Django did spectacularly well, then Web2py
did even better on that particular criterion. There are several-to-
many other excellent Python web frameworks, and there's a clear
consensus among the major players on how to handle simultaneous
requests: threads.

Dustin, I hope you carry on with your plan. I request, please, report
back here what you find. As law professor James Duane said in pre-
introduction of police officer George Bruch, "I'm sure [you'll] have a
lot to teach all of us, including myself."

-Bryan



More information about the Python-list mailing list