Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122080 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 92898 invoked from network); 1 Jan 2024 17:36:51 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Jan 2024 17:36:51 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1704130640; bh=QnMjMZTqcK2skx5NNLVYivRcNdZ7f+DdXguKB1+TgZw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=AnZwmvG07Kz0KWwRLReVORxXmuvMTA1IlrwyH1vOxFnwTZx7rl3SCuCPzhg7SidMk H1cLsZt7fiaM/c4PHR0Rkmf41X4QlqBGGYdsHJ5MLVvQdDgX6OfXiKi8D/bfioZ0wD fcb9cPtBpjenYWdiTKB5YDjABIMjEzkdRbasEj8JjhU+W39Lh+iWkC/hC+Tp2n5/PF 6d4LdrdGtsK2knGJic+5XktguAivcBRrvpqiKNqnzrST6ouxSHNKlUZvtE9ceU7dpS f3SicJR8FplU96dE5MRUj98rhsruUwBX7US8bllYNlOEVD0sKPyEW9xbZk0aRCLDt5 CrlyUT4eAaZEg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 181D018005B for ; Mon, 1 Jan 2024 09:37:20 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.48]) (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:37:19 -0800 (PST) Received: by mail-ot1-f48.google.com with SMTP id 46e09a7af769-6dc36e501e1so1874889a34.1 for ; Mon, 01 Jan 2024 09:36:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704130609; x=1704735409; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=QnMjMZTqcK2skx5NNLVYivRcNdZ7f+DdXguKB1+TgZw=; b=FykukEwbzbdNj/0Fw1ihcOmA2BM8xqLSlaRnFqzYRF0b0iyPFALJLJpujqMlI4ja28 u+Y2sTZIoJbK6aXPhMt0uxV5Lhn2hyGhRvtdho4LmrRgVcvO9mVbFe8ovMH7uD1Mx01p rassOBNFZMZFWNbXNDkZSMhyR2u3G5Lxg8CoRbdWBFGY0A/hyikoza9OPrLgkW+660UZ 9D2zhMLOe+aTbVM1dERcI3DVJMqxKXBgiyqUgMh4SDh+4skgup12DTWqLLIyHKNqhJSO I2zFGGEEXLTxdbbb/jr8kXRxvW94zWiLv2nLFwzCU0Fv5yC7kAI8Oh+D3ih2sY77amTZ A4og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704130609; x=1704735409; h=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=QnMjMZTqcK2skx5NNLVYivRcNdZ7f+DdXguKB1+TgZw=; b=lfIvAwF1w/86+DotDHFeMbdZv0kRLH0FZQdXm6Zsnit4QM2Xx/gHZb+Kqh9tzo58cb +r050A8BhKTW+ePmTvRpdzrZk9w53jfasq90rwMFq1DuPpWfq4Bs1tQ4H3oqOPNZppJJ iS6t2DIDwGliqUiNcKHJuaV4fKo+KTjy2+4RkF0HAEqvUJthL2VyeWqkBxsYUL2jlZAe uRwK+rFXoDlT/EofrFZe6VGmNzMiTu/XTpqXhbbZOoH/KtVo31e2/3JrOtNtRC/gpeGl U+SH2lwH7qlfiTGnLDMTXqj9qDnyKDpwkh4xm4RlT3vs6yyI0Tulg6Gax+j005sH1Xa+ jYqA== X-Gm-Message-State: AOJu0YwQ6NtTkh2P+SjVsVpCxC1vtLN8NsC2tCpELDPLqhQdsePoPEac 5hQOF5bOCzeiDIaebCgZoNop6zeiTJEQyfnWIlY= X-Google-Smtp-Source: AGHT+IEQ0ROp7CoyMm/rzbLQsX04sW5Urw9zjFbKhSpKqCPz9GRlqn4J3UtuexUCLU2O4qhlp8xA5ctecXbrbn28KHA= X-Received: by 2002:a05:6358:6f8d:b0:170:cc82:db41 with SMTP id s13-20020a0563586f8d00b00170cc82db41mr20357331rwn.21.1704130609099; Mon, 01 Jan 2024 09:36:49 -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: Tue, 2 Jan 2024 00:36:36 +0700 Message-ID: To: Rowan Tommins Cc: php internals Content-Type: multipart/alternative; boundary="0000000000009b3885060de5d30a" Subject: Re: [PHP-DEV] RFC proposal: worker mode primitives for SAPIs From: pierre.php@gmail.com (Pierre Joye) --0000000000009b3885060de5d30a Content-Type: text/plain; charset="UTF-8" On Mon, Jan 1, 2024, 6:18 PM Rowan Tommins wrote: > On 31 December 2023 16:31:31 GMT, Pierre Joye > wrote: > > >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 > conversation. > Unless I misunderstand the current proposal, it is about providing a core interface to allow one to create its own SAPI similar to FrankenPHP, which does not handle request in a singe thread but a thread pool handled by go's coroutine. I can imagine other developers implement it using other mechanisms (rust or c++ f.e.) but the main interface from a php internal pov remains. It is a first step and based on the usages/feedback, the next steps could be the second part of your comment. Or? best, Pierre > --0000000000009b3885060de5d30a--