AnyEvent recursive blocking wait with Plack

Mike Schilli anyevent at perlmeister.com
Thu Mar 8 07:14:02 CET 2012


On Wed, 7 Mar 2012, Marc Lehmann wrote:

> If that is true, then more or less the only thing that is supported in
> the requets callback is returning the code reference, and the code
> reference then gets a continuation object.

Good find, I'll give that a try. In the meantime:

This raises an interesting question: In order to make a web application
truly portable between different web servers (as Plack strives to do),
there needs to be some kind of bridge between event- and non-event-based
programming.

Say, my web app does a server-server-request. If I'm running it in
Plack/apache/mod_perl, I need to use synchronous methods (LWP::UserAgent
et al) and if I'm running in an event-based framework like
AnyEvent::HTTPD, I need to use event-based methods (AnyEvent::HTTP et
al).

Plack does in fact report to the web app if it's running on a synchronous or
asynchronous 'platform', but is there a standardized way to offer the
same functionality in a portable way (rhetorical question, I know, but
a man can dream).

-- 
-- Mike

anyevent at perlmeister.com



More information about the anyevent mailing list