News for hackers. Stuff that matters.
Re:Ask HN: What is your preferred Python stack for high traf... by zmitri on Monday August 22, 2011 @01:43AM (#2911460)
Tornado has a very similar feel to web.py, yet can do much more when you are ready for it. If you like web.py you might as well use tornado.
Re:Ask HN: What is your preferred Python stack for high traf... by espeed on Monday August 22, 2011 @03:36AM (#2911712)
Tornado is a different animal -- it's asynchronous so when you write code for it you have to program using callbacks rather than in a traditional style.

My current project requires real-time/always-on connections so I started to develop it using Tornado and then decided to switch to the Quora model -- use a traditional Web framework like Flask for most things, and connect back to Tornado for the real-time stuff.

When I switched to this model, the development process sped up considerably. In addition to just being really-well designed, Flask has an amazing debugger that makes me more productive, and it's easier to write unittests for Flask because you can write them in a traditional way and don't have to contend with Tornado's IOLoop.

For real-time stuff, you could forgo Tornado all together and instead use gevent to deploy your Flask app (http://flask.pocoo.org/docs/deploying/others/#gevent), like some have done with Django and Pyramid, but I haven't tried this yet.

Re:Ask HN: What is your preferred Python stack for high traf... by zmitri on Wednesday August 24, 2011 @11:09AM (#2920978)
You don't need to write tornado in an async fashion. You can use it like you would Flask, but its got a more similar feel to web.py than Flask.