

Tornado 2.0 released - bdarnell
http://groups.google.com/group/python-tornado/browse_thread/thread/9d428eb487a37aed

======
nikcub
can not understate just how well written Tornado is. If you are a web app
developer, it is well worth reading the source of the project - you will pick
up a lot of tips and tricks on developing quick and scalable apps.

outside of the event loop implementation, the framework components are well
written - so tornado is worth checking out even if you are running on a more
standard type of web server environment or appengine

my own web app stack contains a number of modules either directly from Tornado
or inspired by sections of the project

~~~
IgorPartola
I found some parts of it to be very poorly written. Like the error handling
where it assumes you want to return HTML (remember that Tornado was first
written to handle RSS feeds). It also has really poor support for multiprocess
mode, where if a child gets killed , the parent does not restart it. Or if the
parent is killed, the children may continue running. Also the gzip
implementation is broken: if the client mentions gzip even as q=0, Tornado
will use it. Just feels like the devs did not not quite pay attention to the
details as much as the event loop.

~~~
jrussbowman
There's never been a real focus on multiprocess. The recommended solution is
to run individual instances and load balance them with something like nginx
and manage them with supervisord.

Sure the multiprocess stuff is in there, but I honestly wouldn't use it for
more than perhaps a dev environment where you want to spool up multiple
instances quickly for testing.

------
jokull
Anyone know why they didn't go with Jinja2 for templates? When code is this
clean I'm sympathetic towards the "batteries-included" approach, so I'm not
criticizing the choice, just wondering if there was a back story, if it got
evaluated at all. Same for locale.py vs. PyBabel. The template engine seems
far better than Django's at least : )

~~~
rgarcia
My guess is that they wanted to go the "self-contained" route as opposed to
the "amalgamation of different libraries" approach (a la Pylons/Pyramid). This
makes it a lot easier to learn for true beginners since it eliminates the
overhead of navigating the documentation of a multitude of different libraries
.

Tornado is so flexible, though, that it would be pretty straightforward for
you to use whatever templating library floats your boat.

------
antihero
What exactly is the reason for using Tornado over something like
Flask+Gunicorn+meinheld? Preference?

~~~
jrussbowman
Preference is generally the reason for choosing any framework.

What Tornado provides is a small but well featured framework for building web
applications. It's event loop based which allows it to support lots of
connections. It also has been built from the ground up with the idea of
horizontal scaling of it across multiple load balanced instances so if that's
your plan for scaling you know it fits the mold well.

------
MostAwesomeDude
I know that nobody outside of the Python community cares, but it's
disappointing to see that Tornado still doesn't use Twisted for its event
handling.

~~~
cdavid
I don't know if that many people inside the python community care either.
Twisted is very big, documentation seriously lacking, and a lot of stuff in
twisted not that useful if you only care about http. If you care about http,
twisted is not that useful either (there is for example no http 1.1 support
client-side AFAIK).

It would also have made porting tornado to python 3 a huge effort (given
twisted code size).

~~~
hyperplex
[http://twistedmatrix.com/trac/browser/trunk/twisted/web/_new...](http://twistedmatrix.com/trac/browser/trunk/twisted/web/_newclient.py#L5)
I run a web crawler out of Twisted, so I sort of care about HTTP.

~~~
cdavid
I am aware of that code: it is undocumented, and does not have support for
things as fundamental as keep alive. The underscoring does not inspire
confidence either.

~~~
ivank
You're meant to use the public API twisted.web.client.Agent (which uses
_newclient). If anyone's interested in finishing keep-alive support, the
ticket is <http://twistedmatrix.com/trac/ticket/3420>

