Thanks for the reply.

So what anyserver.py does with gevent is not recommended? It calls
monkey.patch_all() which patches threading to use green threads.

Is this something that ought to work but is just untested? web2py is
pure python so the monkey patching should make thread locals into
greenlet locals, right? If that is so, then is the testing something I
could do myself, or does it need to be done by someone who knows the
internals of web2py?

Graeme

On Jun 23, 8:10 am, Massimo Di Pierro <[email protected]>
wrote:
> I am not sure this does not break the new internal web2py design that
> uses thread locals.
> I would not use async unless we have tested this more.
>
> Massimo
>
> On Jun 22, 6:44 pm, graeme <[email protected]> wrote:
>
>
>
>
>
>
>
> > I can see that anyserver.py uses monkey patching to make the standard
> > library cooperative with gevent.
>
> > Could the same be done with eventlet and with Gunicorn (with eventlet,
> > gevent or both)?
>
> > Eventlet has the advantages of being (AFAIK) pure python, and can
> > monkey patch psycopg as well as the standard library.
>
> > Has anyone measured whether it is significantly more memory efficient
> > to run web2py on green threads?
>
> > My use case is that I will have long running controllers (while
> > fetching data from web services). I would like it to be memory
> > efficient, but I am nt* looking for massive scalability or extreme
> > speed. I do not want it to be trivial to DOS (so I need either threads
> > or green threads to handle the long running controllers).

Reply via email to