Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122081 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 94304 invoked from network); 1 Jan 2024 17:40:31 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Jan 2024 17:40:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1704130861; bh=EycAgcEv30SQYppjLLt13fhXm5LsGdoewCBUHmhm7dM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=UxMsqcPPDukrwSujymXDUhI37aOcPVbU3R+5S4i05dKjmBa/YllBzYT7dshRFw4bC T8umlc4qv0d7NGuU2h+Pe3Nk+XNAJ8HBSk6tQjMgHdUAI2LH6fAE+T52iyLSrWwrSP cLtw8HfTZmPgzRhF9z3wB/gVo/+vhk6jqryYlzKpNs+ugmk66mihmVLVswGrTQBmba uc0mdmGTamMTNtsUUB6/KC8ve1ou+J0eOJh57kTCrxjtthdC2dbi8yPT5UqAqBOJIb V6fPIg3Zve1P16nP4W3fms/a8QmsgJN2du3K+hgEYZmiCJw6pW1rmANKiUNTbJdAE8 X0LkmFd9Ci+QA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9EBF718005B for ; Mon, 1 Jan 2024 09:41:00 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-il1-f172.google.com (mail-il1-f172.google.com [209.85.166.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 1 Jan 2024 09:41:00 -0800 (PST) Received: by mail-il1-f172.google.com with SMTP id e9e14a558f8ab-35fc1a1b52bso32068765ab.2 for ; Mon, 01 Jan 2024 09:40:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704130830; x=1704735630; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=EycAgcEv30SQYppjLLt13fhXm5LsGdoewCBUHmhm7dM=; b=Rl3oEbKr123acjryzdeb7ZF8+lwBUkJwfu+HwAjkmoBSl1kCkPDEEDtwWWqjeL+8xB dZLXjfWg6gG9url504THA7Kku1dO8Dgb6UTZneIkWIBYR3eDQvwW0WVyK2uqbdlikcP5 vOLEvEkuQqRThoWavlHnMeTBKktumbAjcdSBO+G2ueruSGSlEhGtZWcWLtmshcq8j1uj LmdX2ToGDZQYv8ssfX+HIEel37/Iyk2uWqDFwFsQm/Nux+ceC62nMEkU0o7FaeBcH/1G P4OfnScrR0MVoJnAaWGlzt8ntSA06BbpsWgHpUbSC2RxqMVOLJCziSqWoK6q/DFiZxr/ nX7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704130830; x=1704735630; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EycAgcEv30SQYppjLLt13fhXm5LsGdoewCBUHmhm7dM=; b=CCnarT0UKBY0OlV4A4k1zzM03bpwc7oPvgnW9fBowS2rMt3fI9XutLRkdPWSvtG3tE pVVnGZA5Tru0vdbhogDxOjZQop44jLwYxrdbPRF6Ub/O9EcqfQJQCRUH2pC9AgsRj7Xq kf5u0nSNrcdDRVKaPiKXWGn2/658iuOzGg7MrZcOaWaNwx2jOjRefThffo9LRhHiSUfu 0tmtQugAbouAx6JKO+6mveqOErKXdQrmeXJ/wIUtYDe21Uuc6dmoHsb5tc6X3lL6DiiX EkVzAf218WCWNDSOlZGTPnY0nOHvCNwFYlYDyg7cNd3d74w7TQHIRxzgWc3nc4N6vzm0 tokg== X-Gm-Message-State: AOJu0Yz1uwyyENcn7z/YQLJjrwI6Li72L2YBE7/BsMweF3ykPCISznd+ zmGwHWQj5a2Z7xSdrfGDwCC6rO3g1reoiI3plc3GVumVNRNXRQ== X-Google-Smtp-Source: AGHT+IEmsJ1z5emdoWdKe3LJdXKLTlaiAfHmKjn6Vn46GAnpQITLBUuMb72Xe97GDHRbGY6AsvxmN0Sid2TQOxoNaGQ= X-Received: by 2002:a05:6e02:1ca1:b0:360:175c:c52e with SMTP id x1-20020a056e021ca100b00360175cc52emr10595835ill.60.1704130829804; Mon, 01 Jan 2024 09:40:29 -0800 (PST) MIME-Version: 1.0 References: <5060b986-2e5a-46e4-9c83-763e5b155e83@gmail.com> <6f7815b9-80cc-4e08-819a-49dca090116f@gmail.com> <7F63D301-1A46-49AA-9140-F64543E902C5@gmail.com> <8fb6672c-06e9-4f74-b2f2-cd1a265c75a5@app.fastmail.com> <96C28696-7C58-4018-84EB-69CF4189649B@gmail.com> <881CFFCD-220F-4A58-B5B9-C1FFFCE5E278@gmail.com> <2462CAA8-3E66-4DAD-8489-77E035708087@gmail.com> In-Reply-To: <2462CAA8-3E66-4DAD-8489-77E035708087@gmail.com> Date: Mon, 1 Jan 2024 18:40:17 +0100 Message-ID: To: Rowan Tommins Cc: Pierre Joye , php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RFC proposal: worker mode primitives for SAPIs From: landers.robert@gmail.com (Robert Landers) On Mon, Jan 1, 2024 at 12:18=E2=80=AFPM Rowan Tommins wrote: > > On 31 December 2023 16:31:31 GMT, Pierre Joye wrot= e: > > >php handles this in threadsafe mode > > Depending on your exact definition of "php", this is either irrelevant or= just plain wrong. > > If you mean "the HTTP SAPIs shipped with official builds of PHP", then it= 's true, none handle multiple concurrent requests in a single thread using = async I/O. But none handle multiple consecutive requests in a single thread= using a "worker mode" either, which is the whole point of this conversatio= n. > > If you mean for "php" to include third party HTTP handlers such as Franke= nPHP, then it also includes Swoole, which is what I was describing. Please = someone correct me if I'm wrong, but I understand ReactPHP and AMPHP also i= nclude HTTP servers using the same principle. > > So, to reiterate my point once more: implementations of PHP using async c= oncurrency are out there already in production use. If we're attempting to = standardise a new API for worker modes (i.e. HTTP servers which are no long= er "shared nothing"), choosing one which can be used by consecutive worker = modes (FrankenPHP , RoadRunner) but not concurrent ones (Swoole, ReactPHP, = AMPHP) feels like a big missed opportunity. > > Regards, > > -- > Rowan Tommins > [IMSoP] > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > Hey Rowan, I'm not sure concurrent servers would even be able to be in scope if we wanted them to be? PHP doesn't have an "event-loop", concurrent i/o, or any building blocks needed to serve concurrent requests. It's been made possible through extensions and libraries that aren't maintained by PHP, so I'm not sure how we'd support them directly without those other basic functionalities. If we directly wanted to support concurrent servers, I think there is probably a lot of work to do at a very low level before we could realistically include them in this part of the conversation. Robert Landers Software Engineer Utrecht NL