Fast HTTP framework?

1 view
Skip to first unread message

Dirk Neumann

unread,
Aug 27, 2009, 4:12:34 PM8/27/09
to djan...@googlegroups.com
Fellow Djangolans/

Can anyone recommend a lightweight and really fast HTTP framework for python?

I'm currently writing a HTTP-based server for memcached to get around
some of it's limitations (object size, authentication, encryption) and
to essentially turn it into a giant, secure distributed hash table.
The app's load consist mostly of small (couple of kB) PUT and GET
request, with several larger request (up to 128 MB) interspersed. So
far, I've been using python's BaseHTTPServer (w/ ThreadingMixIn) that
has a pretty bad PUT latency (1-2 s for a 1 kB request via the
loopback device).

Do you guys know anything that is multithreaded and maybe has
asynchronous ('streaming') callbacks? Preferentially with WSGI
support?

Thanks !

-- Dirk

Ryan Witt

unread,
Aug 27, 2009, 4:53:53 PM8/27/09
to djan...@googlegroups.com
Have you taken a look at Twisted? http://twistedmatrix.com/trac/

I think it has most of the features you're talking about, but I think
it's select based.

Brian Luft

unread,
Aug 27, 2009, 5:17:22 PM8/27/09
to djangola
Twisted has a lot of good stuff but I'd expect a bit of learning curve
depending on your needs. I found the documentation to be lacking in
examples and wished it had done better job in places of tying the main
concepts together in the context of real applications. YMMV.

AlsoCheck out http://werkzeug.pocoo.org/

I've also heard good things about spawning but haven't seen much press
about it lately:
http://pypi.python.org/pypi/Spawning/0.7

Brian Luft

unread,
Aug 27, 2009, 11:15:05 PM8/27/09
to djangola
These 2 articles have a lot of good information:

http://www.eflorenzano.com/blog/post/writing-blazing-fast-infinitely-scalable-pure-wsgi/
http://blog.delaguardia.com.mx/tags/werkzeug

On Aug 27, 2:17 pm, Brian Luft <luftyl...@gmail.com> wrote:
> Twisted has a lot of good stuff but I'd expect a bit of learning curve
> depending on your needs. I found the documentation to be lacking in
> examples and wished it had done better job in places of tying the main
> concepts together in the context of real applications. YMMV.
>
> AlsoCheck outhttp://werkzeug.pocoo.org/

Dirk Neumann

unread,
Aug 28, 2009, 1:05:12 AM8/28/09
to djan...@googlegroups.com
Hi Brian, Ryan, Thanks a lot for the info!

The multiprocessor support in Spawning looks awesome, I'll give it a try.

-- D.

Reply all
Reply to author
Forward
0 new messages