Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 16743 invoked from network); 12 Nov 2009 18:53:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Nov 2009 18:53:58 -0000 Received: (qmail 39557 invoked by uid 500); 12 Nov 2009 18:53:57 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 39521 invoked by uid 500); 12 Nov 2009 18:53:56 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 39513 invoked by uid 99); 12 Nov 2009 18:53:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Nov 2009 18:53:56 +0000 X-ASF-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 129.199.96.40 is neither permitted nor denied by domain of nicolas.george@normalesup.org) Received: from [129.199.96.40] (HELO nef2.ens.fr) (129.199.96.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Nov 2009 18:53:54 +0000 Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id nACIrW1B049801 for ; Thu, 12 Nov 2009 19:53:32 +0100 (CET) X-Envelope-To: Received: by phare.normalesup.org (Postfix, from userid 1001) id 917DFBC0B2; Thu, 12 Nov 2009 19:53:32 +0100 (CET) Date: Thu, 12 Nov 2009 19:53:32 +0100 From: Nicolas George To: modperl@perl.apache.org Subject: AJAX pseudo-push Message-ID: <20091112185332.GC31986@phare.normalesup.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.1.4 (nef2.ens.fr [129.199.96.32]); Thu, 12 Nov 2009 19:53:32 +0100 (CET) --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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, --=20 Nicolas George --bp/iNruPH9dso1Pn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkr8WawACgkQsGPZlzblTJMxIACfT7F0cNM3dZVFiOyzWN/yfjif a/oAn1PpJv5wZ4Q9a9Rf1YYMlDPpwQkZ =fli5 -----END PGP SIGNATURE----- --bp/iNruPH9dso1Pn--