i was hoping tornado support for asynchronous sql database opertion ,after i read the source code,
http://www.tornadoweb.org/documentation/_modules/tornado/database.html#Connection
sigh,they are blocking version.here's some choice .
Plan A: find a set of api similar to mysqldb module except they use callback to return the reuslt.sorry i didn't find one that show examples that's their api can handle non-blocking mysql operation
Plan B: use the block version .i heard the writer of tornado suggest developers use block version,and extremely optimize your sql query for shorten the blocking period.
in my case: the server need to handle receive 2k request per second in peak hour and most of them need query and update from database ,suggest every operation take 10ms,10ms*2k over 20s ,that would be a nightmare.in multi thread programming at least i can make more connections for more average response time.
maybe i missed some point here,i have not much experience for backend development.however i still think using blocking io api is a suck idea while the framework is non-blocking.
Plan C: drop MySql use mongoDB, i heard mongoDB has an asynchronous Python implement api named asyncmongo, but im not sure the risk to learn mongoDB and take mongoDB as our business choice