[Chicago] Tornado, shines good on Python?
Tal Liron
tal.liron at threecrickets.com
Fri Sep 18 17:48:59 CEST 2009
Wow, everybody's all crazy about non-blocking I/O these days!
I'm jumping the gun a bit here, but the RESTful platform I'm working on,
Prudence, is based on a non-blocking I/O server (Grizzly) over the JVM.
(In my ChiPy presentation, I called it "Restoration". That had to be
renamed. Sounded like a backup solution product!)
The update since my presentation is that Prudence now works with Jython
2.5, kinda. Jython 2.5 ended up being released without support for
JSR-223, which Prudence requires. However, it does have support in svn.
HOWEVER, this support is all kinds of broken! So, I've included a
patched version of Jython 2.6svn in Prudence, and am joining the Jython
team, I guess, to try to fix this good.
Details, details. I'm also working on having Prudence available in
different "flavors". The Python flavor, which will be the first, will
feature a nice demo web app, with Prudence as the "frontend" and
SQLAlchemy as the "backend". For those interested, I will likely be
presenting it at ACM on Nov 12. Until then, go for the svn snapshot of
Prudence to get it with Jython 2.5:
http://threecrickets.com/prudence/
For the record, I think non-blocking I/O is useful for a very, very
small group of applications, which either truly hit the "c10k users"
roof, or are web services in extreme volume environments (such as in the
trading industry). For anybody else, please repeat to yourself over and
over that "scalability does not equal performance". In fact, many
applications that are designed to scale well perform poorly. (memcached
comes to mind. This will be part of my next talk at ChiPy, about Django
performance.) All this to say: Tornado is interesting, Twisted is
interesting, Prudence is (of course!) interesting, but their
non-blocking features might be irrelevant to you.
Actually, Prudence lets you switch its web server to blocking Jetty,
which can be good. Non-blocking I/O is tricky to code, and these
libraries are notorious for very hard to find, and weird bugs. I can
provide non-joyful anecdotes. Bottom line: robustness may be more
important than scalability for you.
Final note: there are extremely scalable web servers out there that use
/blocking/ I/O. When you need to scale: test, and don't believe the hype.
-Tal
More information about the Chicago
mailing list