Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The creators of Tornado recommend writing synchronous code for everything except "long" operations for which you have no control. Examples of these include long polling and requests to third party services. Requests to your local database are not long operations. If these requests are long operations, then you have a latency problem with your application.

The Tornado people recommend running more instances of the application than CPUs to handle the short blocking requests to local databases and what not.

Although it depends on what your app does, my guess is that typical applications written with this philosophy are mostly synchronous code.



With eventlet and gevent you can write asynchronous that looks synchronous. Which is the point of greentornado.

That being said we still use synchronous calls to our databases.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: