Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108253 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 63997 invoked from network); 26 Jan 2020 23:21:48 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Jan 2020 23:21:48 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1E88D1804AC for ; Sun, 26 Jan 2020 13:31:48 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 26 Jan 2020 13:31:47 -0800 (PST) Received: by mail-wr1-f46.google.com with SMTP id g17so8634884wro.2 for ; Sun, 26 Jan 2020 13:31:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=m2K5rZZ4Jwow3k2dw49MTPJn9jzYn/bbycRrmUh5S7o=; b=kYbUTAVF5CIZU7bW5L8+Mh0bXrrcbjUOj2Iw/1C3UrktLspTIGRzvoQYezByajx7t7 bY0A35pTAWohn31ovnVYwHE3CDQ2ZBG2lMnwtbPYlVoEX8q1mMvZGbl2XKayv3NWS9wB 6r9MJLpCW4qKLXgqvRFrqQ9xPEcVCSFtF62kmHECbrIyocKYCDb3t778lK2ALIKXS/f/ +wQTJ/Ejju+7TN5Vdk/fIfZWY/y0hANRDHcCEqIfbO1PFDt6A2s2Puzn/HgAykvvoXV2 6tjQBbYgiFMBzK8YpR0Jvf+GnE78ICEwfOY95sgodUV9WHy8RXWRv21aD2CqeTI2aRVn Pg+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=m2K5rZZ4Jwow3k2dw49MTPJn9jzYn/bbycRrmUh5S7o=; b=A+0JZXk+aR94/XcY9DOLhcwmgeAAy2nwAoP3TLTgQ4qxd3enbbj3VyhCfDao/7pEog 2Nv0itS6q1R/1H5oPOkMFi+pCp5F2aNPsfkDc1iiCcuwSXNW86U4ITnz5SyvT4HtOXA3 LbxAsIwsLhdlxbQw33aZwWnc+IvSXjs9TSzHW/Bd6qRfOyfu2X+49dpPgbRyz8xDATM1 cwKJS1+PyUB6ixJSYq9cEZ0j3b2OVVqz85bQ+aVMoBanInq/utMR6i5cDX8WCxxHmo84 /oKeIB6D4hUHm1EcW+uR3TPC8Mo3G48ek9pCpjsR9ZPGH77vf9Ib2OvVswfkJGQJ/cyQ LI+A== X-Gm-Message-State: APjAAAXJ5PZKZ1HCz72qa8vh+SkFozQPnRI5LJiPMOZdcIDcY4R4KtCA DpTIxbWk4y9obS07Oaue6RAj74Md X-Google-Smtp-Source: APXvYqz/4P7faXaF8CmHKJ41Ulmy2pnngVcr4VVOCO1pTvkGfLOL4+g1/fP7i1rg06I0GH/l21cd8w== X-Received: by 2002:a5d:540f:: with SMTP id g15mr16822822wrv.86.1580074303970; Sun, 26 Jan 2020 13:31:43 -0800 (PST) Received: from [192.168.0.14] (cpc84253-brig22-2-0-cust114.3-3.cable.virginm.net. [81.108.141.115]) by smtp.googlemail.com with ESMTPSA id s139sm16442562wme.35.2020.01.26.13.31.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Jan 2020 13:31:43 -0800 (PST) To: PHP internals References: <3ca6d665-1a4f-8f7a-c82a-2e899f2e8df1@gmail.com> <44ba543d-b6eb-888b-9ed5-0f1e9d3b53b9@gmail.com> <8E382251-AE41-4BD9-A5F8-135D11B9E10D@newclarity.net> Message-ID: Date: Sun, 26 Jan 2020 21:31:42 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <8E382251-AE41-4BD9-A5F8-135D11B9E10D@newclarity.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [PHP-DEV] Add viable long running execution model to php 8 From: rowan.collins@gmail.com (Rowan Tommins) On 25/01/2020 22:03, Mike Schinkel wrote: > I'm not following the discussion 100% – more like 85% — but it seems > like what we might be saying is the need for a user-land > implementation of a long-running PHP request, one that does not timeout? It's not about timing out, as such, it's about starting with a fresh state each time a request comes in from the web server. So the long-running script can't just "opt out of time outs", it's got to be launched by something other than a request - in existing implementations, it's basically started as a command-line script, and then handles the networking itself. > Then we could look to prior art with GoLang channels where they "Communicate to share memory" and do not "Share memory to communicate." IOW, add an API that allows a regular PHP page to communicate with a long-running page. This would decouple and allow for better testing, and hopefully fewer hard to track down bugs. In general, though, this is an interesting concept: keep each request separate, but have a "master process" (initialised when the server starts, or by something similar to a fork() call in a normal request) that all requests can explicitly share things with. I'm not sure that would work well for Web Sockets, because it still relies on the traditional request-response cycle, but I've never really used them, so don't know what kind of architectural patterns make sense for them. Regards, -- Rowan Tommins (né Collins) [IMSoP]