Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85585 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30060 invoked from network); 31 Mar 2015 13:57:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Mar 2015 13:57:00 -0000 Authentication-Results: pb1.pair.com header.from=rdlowrey@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rdlowrey@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.182 as permitted sender) X-PHP-List-Original-Sender: rdlowrey@gmail.com X-Host-Fingerprint: 209.85.213.182 mail-ig0-f182.google.com Received: from [209.85.213.182] ([209.85.213.182:37950] helo=mail-ig0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 67/F1-19097-BA7AA155 for ; Tue, 31 Mar 2015 08:56:59 -0500 Received: by igbqf9 with SMTP id qf9so17570373igb.1 for ; Tue, 31 Mar 2015 06:56:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:from:date:message-id:subject:to:content-type; bh=j18yXLTul9x90IFU8nAe/LKUsknVMbnFPHcU2r1QWO4=; b=T4d3i6ob70jp6ObeDokPllxmtZTKmvr8ZGibZ3JPl/YdPaeP/ueBUHoe1/qNLJ1g3s 1z2eXE03MVQZlphnT3rlvHcmKDSGOQBuwj+rsjxLYaTolvXlyFmRZHxroIIG4Tc/boiB Ay80q6He/4y1RQ+7OLg3JqnwLQFsXWxJlTNQF7c6I1NfW3J/gBcKyQ+MtVfZQfdR217I eswEQK93EJ/zzAmJlsRNkwrOhhj14DBU9YiS+puBoAL63d2WEsMs2sfkZYgNxtiUAJaK vj8Txxdj9MWL3YnKrTA1dPDkGar8xxXU5nk2VIpQYbqaWQrapktNtuXzH2GawM3an/9Y hZJA== X-Received: by 10.107.17.105 with SMTP id z102mr17277346ioi.28.1427810216441; Tue, 31 Mar 2015 06:56:56 -0700 (PDT) MIME-Version: 1.0 Date: Tue, 31 Mar 2015 13:56:55 +0000 Message-ID: To: "internals@lists.php.net" , gregory@luni.fr Content-Type: multipart/alternative; boundary=001a113f6c4ec2217a051295f80e Subject: Re: HTTP/2 and Websocket support in 7.x versions From: rdlowrey@php.net (Daniel Lowrey) --001a113f6c4ec2217a051295f80e Content-Type: text/plain; charset=UTF-8 HTTP/2 is entirely outside the scope of the PHP web SAPI as it currently exists. The protocol impacts the actual HTTP server and has nothing to do with the SAPI runtime which is simply handed information about the HTTP request once the server parses it. The protocol used to communicate those details between the client and the HTTP server does not concern the web SAPI. There is no need for any sort of "support for h2" in PHP; it's the web server's concern. Apache and nginx will add support for h2 and PHP will continue working as it always has. That said, the php web SAPI derives exceedingly little benefit from the advent of HTTP/2.0. h2 is designed to allow multiplexing of many requests over the same TCP connection but the PHP web SAPI still has the same bottleneck it had before h2: one thread/process per request. As for websockets, you *can* do that using the web SAPI right now if you wished but this would be inadvisable because long-lived connections will quickly fill the bottleneck in every PHP web application (concurrent threads/processes for each "request"). Instead, the appropriate solution for websockets would be to implement a socket server directly in the CLI that speaks the websocket protocol. Would it be useful to have raw incremental parsing functionality for HTTP/1.1, HTTP/1.2 and websocket protocols available in userland? Sure, but this falls more in the realm of an extension than anything else as few people are implementing full-blown http and websocket servers in the CLI right now. --001a113f6c4ec2217a051295f80e--