I\'m trying to write simple web application using Tornado and JS Prototype library. So, the client can execute long running job on server. I wish, that this job runs Asynchronou
I've converted Tornado's chat example to run on gevent. Take a look at the live demo here and the explanation and source code here.
It uses lightweight user-level threads (greenlets) and is comparable in speed/memory use with Tornado. However, the code is straightforward, you can call sleep() and urlopen() in your handlers without blocking the whole process and you can spawn long running jobs that do the same. Under the hood the application is asynchronous, powered by an event loop written in C (libevent).
You can read the introduction here.