perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas George <nicolas.geo...@normalesup.org>
Subject AJAX pseudo-push
Date Thu, 12 Nov 2009 18:53:32 GMT
Hi.

There is an increasingly popular technique to emulate server-initiated push
over HTTP. I'm sure everyone here knows it well, but for the sake of
completeness: the clients sends a XMLHttpRequest to the server in the
background; the server does not answer it immediately, but keeps it for
later when there is actually something to say to the client; if the request
timeouts, the client re-sends it.

I am wondering if this technique is usable with Apache in general and
mod_perl in particular.

The obvious solution is to have the request handler sleep until it has
something to answer does not work, since it requires a worker thread and a
perl interpreter for each waiting client, and perl interpreters are few and
expensive.

The ideal solution would be if some part of the request handler could put
the current request (A) "on hold". Later, the handler for another request
(B) could retrieve the request A and generate an answer for it, or at least
wake it up.

Is something like this possible with Apache and mod_perl?

Regards,

-- 
  Nicolas George

Mime
View raw message