News for hackers. Stuff that matters.
Re:Gevent: the Good, the Bad, the Ugly by amix on Saturday October 30, 2010 @08:21AM (#1850728)
My argument is that most things that potentially take a lot of time are blocking by default in Python, which makes it a bad fit for making non-blocking servers... I am not arguing that blocking servers have better perfomance than non-blocking servers...
Re:Gevent: the Good, the Bad, the Ugly by BarkMore on Saturday October 30, 2010 @03:56PM (#1851661)
I am arguing that a small number of things take a long time in a web server. Can you give some examples of things that potentially take a long time in a web server that are not already covered by Tornado (http client, long polling)?
Re:Gevent: the Good, the Bad, the Ugly by amix on Sunday October 31, 2010 @08:01AM (#1853124)
Database drivers (Redis, MySQL, Tokyo Tyrant etc.) and a bad query/overheated database server can easily take over 1 sec execution, which would basically stall your servers each time such a query is run. File handling and system calls are blocking in Python. E.g. if your system call is expensive - say you are processing an image via imagemagick, very common for most web applications, then it will block your server.
Re:Gevent: the Good, the Bad, the Ugly by BarkMore on Sunday October 31, 2010 @03:37PM (#1854101)
Blocking for short periods of time is fine if you run more than one instance of the python application per core.

If database database access is taking more than a second, then I recommend fixing that problem first.