News for hackers. Stuff that matters.
Re:Tornado 2.2 released by crcsmnky on Monday January 30, 2012 @03:57PM (#3530620)
For 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)?
Re:Tornado 2.2 released by Maascamp on Monday January 30, 2012 @07:11PM (#3531163)
For Postgres there's Momoko 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-asynchr...). I followed the chartio approach and added in some async cursors to fit in better with the tornado database module. Pretty straightforward stuff.
Re:Tornado 2.2 released by jrussbowman on Monday January 30, 2012 @05:50PM (#3530964)
I 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.

Re:Tornado 2.2 released by Yaggo on Tuesday January 31, 2012 @01:54AM (#3532188)
I benchmarked pymongo vs. asyncmongo and found no performance gain (or even negative gain) with the latter unless making relatively heavy/slow queries. So, the asynch spaghetti is not worth of it in most cases, just like the authors experienced with MySQL.
Re:Tornado 2.2 released by peterbe on Monday January 30, 2012 @05:28PM (#3530911)
I 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.

Re:Tornado 2.2 released by salem on Monday January 30, 2012 @09:30PM (#3531541)
Before the Twisted/Tornado bridge existed, I made a rest-api for my DB in Twisted. There are a bunch of good async DB clients implemented for Twisted Python. It also made for good MVC separation.
Re:Tornado 2.2 released by giulivo on Monday January 30, 2012 @05:44PM (#3530949)
MongoDB with asyncmongo