[resending to list]

I'm wondering how possible this really is.  Flask and Bottle, at least,
depend on setting a thread-local variable to store the current request,
response, and general environment, but with asyncio allowing multiple
concurrent requests on a single process/thread, those variables start
getting stepped.  In particular, my Flask fork is having issues as Flask
keeps complaining the request is incorrect ("Popped wrong request
context."), but given the nature of concurrent requests, it isn't 100%
consistent.

Therefore, I wonder if the current popular web frameworks can be used at
all, and instead, we'd have to rewrite one or more to not depend on
thread-local variables, among other things.

Don


On Sun, Feb 16, 2014 at 7:06 AM, chrysn <chr...@fsfe.org> wrote:

> hello python-tulip list,
>
> i've played around with aiohttp and flask/werkzeug/pocoo (an wsgi based
> classical python web framework), and found that they can be made to play
> nicely with each other easily. some features of the werkzeug framework
> are sidestepped, i'm waiting for the developers' feedback to see how bad
> it is.
>
> the demo code can be fetched from [1], the discussion on
> pocoo-l...@googlegroups.com is archived at [2].
>
> what are your opinions on this? if it works out, is there still a need
> for dedicated asyncio web frameworks, apart from the lowest layer that
> provides a wsgi+async interface?
>
> if the topic fits here, i'd like to keep this thread updated if relevant
> information comes back from the pocoo people.
>
> best regards,
> and thank you all for providing this cool new python base technology
>
> chrysn
>
> [1] https://www.gitorious.org/aiohttp-werkzeug-demo/aiohttp-werkzeug-demo/
> [2] https://groups.google.com/forum/#!topic/pocoo-libs/mTS1X7hfnkk
>
> --
> To use raw power is to make yourself infinitely vulnerable to greater
> powers.
>   -- Bene Gesserit axiom
>

Reply via email to