Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40511 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93569 invoked from network); 14 Sep 2008 20:53:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Sep 2008 20:53:25 -0000 X-Host-Fingerprint: 82.139.115.2 ip82-139-115-2.lijbrandt.net Received: from [82.139.115.2] ([82.139.115.2:29797] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8A/F0-11861-3C97DC84 for ; Sun, 14 Sep 2008 16:53:24 -0400 Message-ID: <8A.F0.11861.3C97DC84@pb1.pair.com> To: internals@lists.php.net References: <54.9F.33739.7631DC84@pb1.pair.com> Date: Sun, 14 Sep 2008 22:53:27 +0200 Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Posted-By: 82.139.115.2 Subject: Re: [PHP-DEV] PHP Suspendable requests for Apache From: rustamabd@gmail.com ("Rustam Abdullaev") > Can you provide some scenario, when this is useful? Server Push is an http hack that enables the server to send a message to the client immediately, without the need for a client to poll the server. Basically, the client makes an XMLHTTP request to which the server doesn't answer immediately, but only answers when an event occurs, or when it times out (then the client re-opens the connection). Examples: 1. Chat rooms. It's nice to post new messages to the clients as soon as they become available. 2. A Mail client can inform the user of new mail as soon as it arrives. (as does gmail) 3. Long searches can return as soon as data is available, without polling the server every n seconds. More details here: http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQ Now., the problem is that valuable server resources are taken up by these lingering connections: 1) A TCP Connection. The practical limit on these is ~100,000. Which is pretty high. I could live with that. 2) The Server Thread. The limit is very low, on the order of ~100. That's why it is very important to be able to release the server thread. Hope this helps, - Rustam -