ANN: Twisted 1.1.1

Just just at
Wed Dec 10 23:11:40 CET 2003

In article <vtf9392drnns04 at>,
 claird at (Cameron Laird) wrote:

> In article <br849l$qp9$8 at>,
> Jarek Zgoda  <jzgoda at> wrote:
[ ... ]
> >Most of the world still blocks execution with synchronous sockets. Event
> >driven programming is not a wholly accepted idea.
> 			.
> 			.
> 			.
> Sooooooo true.  Hang out with Perlites or C++ians sometime;
> you'll hear them talk about how easy it is to do networking
> now, and then they start saying words like "fork" and "thread".
> My point is that their accepted concurrency models involve
> serious burdens in regard to performance and developmental
> fragility.
> Mr. Zgoda's right:  event-driven networking remains poorly
> appreciated, and those of us who favor it find it MUCH
> preferable to the alternatives.

This ties nicely into the xsdb + stackless discussion:

  - threads + blocking sockets is attractive since the code can be
    written in a natural style, yet cause overhead and
    synchronization headaches.

  - async sockets are attractive because they avoid threads and
    therefore avoid overhead and synchronization issues. Yet it
    is often a bit harder to code, since you need to turn your
    code inside out, using callbacks.

But there is a "perfect" solution: co-routines. With co-routines you can 
both write the code in a "natural" style, but still using an even-driven 
core. This is a very pleasant model to work with, so I totally 
understand that some people (eg. Aaron) choose to use Stackless to make 
this possible.


More information about the Python-list mailing list