Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85610 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93518 invoked from network); 31 Mar 2015 21:32:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Mar 2015 21:32:53 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.181 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.181 mail-wi0-f181.google.com Received: from [209.85.212.181] ([209.85.212.181:32924] helo=mail-wi0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B7/41-19757-3821B155 for ; Tue, 31 Mar 2015 16:32:52 -0500 Received: by wixm2 with SMTP id m2so22888727wix.0 for ; Tue, 31 Mar 2015 14:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to :message-id; bh=oFHIXZDsU/MHogDyq6wGkLMBJ7Fu2nK3EaYfpDYDy3s=; b=iLGp8jmJI6RTPE+kjUVxpnNYmVJqyZoLkz3uLyDwJfStNnnt0t4IfnnjAcklsziknC pHebIzP4eFZKW2DnpgyHmK2w2pU7ZiAavZ6HjfOCGKMSlGf3IFYDyGyhx8pu3dc3y+wV CeuqBcBA9XqGU8ZgjtfkhB0SGy6JMPj7BFZ+RYjjWKAysx1N97miki7GTyMG1FxxFqfd IrKVq5mvcwOGsG7Tmz3BcE1tg2gyXJkQz+v/KfUI7c9Q51DV4FA5soL8EQjdMiLZBFss 7podXseY6xZrqRfI3jSxHQoT3yuQ/MneOeI5wa7QwgQ63nLxhUcSgfnKzIeQXSj3//Ue WckQ== X-Received: by 10.180.94.199 with SMTP id de7mr9090286wib.53.1427837568312; Tue, 31 Mar 2015 14:32:48 -0700 (PDT) Received: from [192.168.0.2] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id pm6sm22599400wic.20.2015.03.31.14.32.47 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 31 Mar 2015 14:32:47 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: <551B025C.6010702@hristov.com> References: <551AAB20.6060100@luni.fr> <551AB705.5040001@hristov.com> <551ABCAF.4070008@gmail.com> <551B025C.6010702@hristov.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Tue, 31 Mar 2015 22:31:43 +0100 To: Andrey Hristov ,internals@lists.php.net Message-ID: <19D697AD-8FC9-4A49-A7B5-3577ED251830@gmail.com> Subject: Re: [PHP-DEV] Re: HTTP/2 and Websocket support in 7.x versions From: rowan.collins@gmail.com (Rowan Collins) On 31 March 2015 21:23:56 GMT+01:00, Andrey Hristov wrote: >So, if Zend can be optimized to quickly clean the execution >environment, >and easily switch between them, we can have a giant leap towards >concurrent non-blockable PHP. The idea is simple - the Zend environment > >should be some structure, and TSRM needs implementation not using TLS, >in this case. The MySQL Server used to bind a connection to a thread >but >since years these are decoupled and with the right plugin you can have >100 threads serving many times more connections because thread >switching >is an expensive task. This ain't rocket science. You make it sound so simple, but the fact that an environment is set up and torn down for each request is fundamental to the whole language, not just a detail of the engine. If all you're doing is making that setup and teardown quicker, I don't see how you're getting any closer to asynchronous code. FPM could do all sorts of magic with its memory management, but it wouldn't help someone write a WebSocket server. Maybe I'm missing something, but I can't picture how you'd have a meaningfully event-based SAPI that looked just like a single-request one to the user. Regards, -- Rowan Collins [IMSoP]