[Stackless] a pyevent-based socket proxy module

Richard Tew richard.m.tew at gmail.com
Mon Mar 17 15:19:48 CET 2008


On Mon, Mar 17, 2008 at 1:22 AM, Phoenix Sol <phoenix at burninglabs.com> wrote:
> I started on a pyEvent-based socket proxy module.
>
> It's still rough and could use a lot of love, but so far I have it working
> with urllib, and urllib2 clients (no client benchmarks yet...),
>  and using a variant of Richard's basicWebserver.py ( with the delays
> removed, lol ) it handles ~505 requests per second on my old
> sempron 2800 with "ab -n 10000 -c 500 http://localhost:8080/". This is, of
> course, with apachebench running on the same box and
>  all kinds of other things running. The same code and benchmark reveals ~81
> requests per second using stacklesssocket. Hopefully
> this makes it interesting enough for some of you fine hackers to step up and
> contribute.
>
> I will be testing it on Amazon EC2 soon, with more serious applications
> (custom code built using the cherrypy WSGI server,
> very similar to Arnar's stacklesswsgi example). Let me know if you are
> interested in the results.
>
> If anyone has the time and the inclination, please look this over and
> contribute if possible. It's much appreciated =)
> The source follows below, and is also included as a file attachment.

It looks like a good start.  It makes me think that perhaps the stacklesssocket
module should be more abstract and allow plugging of different asynchronous
IO solutions underneath.  Especially if the performance is that much better.

The stacklessexamples project is officially MIT licensed.  Can you place it
under that license?  At least for the version which we can add there.

Cheers,
Richard.



More information about the Stackless mailing list