4 ms·
Tornado 2.2 released
- csytan 15y agoCongrats! I've been using Tornado for over a year now and am impressed with how active Ben has been in improving it. I'm especially happy with the addition of this simple but important feature: "Template errors now generate better stack traces."
- emehrkay 15y agoTornado has definitely taught me to keep my templates as dumb as possible. Most of the time my errors are me trying to access values that doesnt exist
- alexhaefner 15y agoCan anyone here speak to Tornado.websocket? What's the performance like? How could you load balance with torando.websocket? Is it production ready? Congrats on the release!
- peterbe 15y agoFew people seem to use it directly. Most people are writing production systems with the Tornadio2 wrapper (https://github.com/MrJoes/tornadio2 https://github.com/MrJoes/tornadio2) or sockjs-tornado (https://github.com/MrJoes/sockjs-tornado https://github.com/MrJoes/sockjs-tornado) Load balancing is usually done with HAProxy I hear.
- jrussbowman 15y agoI will second this. I originally deployed chatfor.us with tornadio and then moved to sockjs-tornado and found both extremely easy to implement. I use ha proxy for that app. Unscatter.com doesn't use web sockets and I use nginx as the proxy load balancer for it.
- stuartk 15y agoI'm currently creating a product using the Tornadio2 wrapper. The developer Serge is actively developing, and is very helpful. HAProxy is often used for load balancing websockets as it supports tcp proxies. There is a tcp module for nginx that can be compiled in at https://github.com/yaoweibin/nginx_tcp_proxy_module https://github.com/yaoweibin/nginx_tcp_proxy_module
- majke 15y agoSockJS-tornado can be hosted via HAProxy. If you don't need native websockets, sockjs will work behind any sticky-sessions-aware loadbalancer using comet fallbacks.
- LeafStorm 15y agoOnce I wrote a server that speaks the Redis protocol using Tornado's TCP networking tools. It was probably the nicest API for asynchronous networking without coroutines that I have ever seen.
- km3k 15y agoAt first I thought this was going to be about a different Tornado. http://borkhuis.home.xs4all.nl/vxworks/vxworks.html http://borkhuis.home.xs4all.nl/vxworks/vxworks.html
- crcsmnky 15y agoFor the folks out there using Tornado in production, what database (if any) are you using it with? Are you using an async interface to your database (assuming one is available)?
- peterbe 15y agoI use MongoDB and to do that I use MongoKit. Works really well. I also use Redis for the caching (note: not as a database) For both Mongo and Redis I use the sync libraries. So far, I don't have any slow queries that would require me to async them.
- giulivo 15y agoMongoDB with asyncmongo
- jrussbowman 15y agoI use mongodb with bit.ly's asyncmongo. I honestly was a bit frustrated with it from a development standpoint because of all the callbacks. Just felt like spaghetti code. Since I have started applying tornado.gen its been pretty effective. Asyncmongo may not fit all use cases though. As I understand it it can be difficult to deal with paging potentially based off of what I have read in the issues on the github repo. Also last I checked it doesn't support tailable cursors. One thing to note is that with friendfeed they did synchronous requests to MySQL and their thought was you should make sure the requests responses are quick enough that blocking is not an issue. After working hard to do asynchronous requests I'm now of the opinion I should have taken their word for it.
- Maascamp 15y agoFor Postgres there's Momoko http://momoko.61924.nl/ http://momoko.61924.nl/ which is really quite nice. If you're using MySQL you have a few options including patching MySQLdb as explained by chartio (http://chart.io/blog/2011/06/10/making-mysql-queries-asynchronous-in-tornado/ http://chart.io/blog/2011/06/10/making-mysql-queries-asynchr...). I followed the chartio approach and added in some async cursors to fit in better with the tornado database module. Pretty straightforward stuff.
- 15y ago
- craigyk 15y agoHow would people recommend doing async file IO w/ tornado? I was using Tornado until I needed to write a server to handle very large file uploads at which point I switched to Node.js + CoffeeScript.
- wisty 15y agoYou could just use URL plumbing and nginx for the uploader. This looks promising: http://didipkerabat.com/post/2724838963/nginx-file-upload-and-tornado-framework http://didipkerabat.com/post/2724838963/nginx-file-upload-an...
- phatbyte 15y agoWow, I'm really impressed with Tornado. I'm learning node.js at the moment, but I've been working with Python/Django as well, so I will definitely consider this for my project. Any benchmarks between node.js and Tornado btw ?