Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126783 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 3472F1A00BC for ; Sun, 16 Mar 2025 09:25:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1742116961; bh=69w3PnlnXECsR3eu4+XRXDbzDGnEl5bsujPnwFesI40=; h=From:Date:Subject:To:From; b=CFmN4vBV8kBaFS/Pt8d4sPRvTnKK4SbCWkzGtdbACJRmqBIJ82GpIwQBGauRJIkED 7MpOo9orHlwRIjxY5xwFKEz6aaEUWryPW+wVaVlyekJ2s9bRb1BfOSseKK1qnJ0hcG BbhZSjxHHmgBHoikjQ33s28q/bNZ1MTNNOFLpdMO9Tjg/3eLW6hGfspwYc1lLm3ZfJ 6c1dvg1BbkwMkBxsEKJZWcJ+tJXIBcull7tTVRghydO9lUchUfKluQICaoZIIUE90E lNucM7ElqcfM2YlBBtqnBZW72I8gRlxtbed0hFAchTvpIH94LVsiqdT6lhDHfKShXs 98tRxqGsBAfQw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 44F4D180053 for ; Sun, 16 Mar 2025 09:22:40 +0000 (UTC) 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.0 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,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-yb1-f178.google.com (mail-yb1-f178.google.com [209.85.219.178]) (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 ; Sun, 16 Mar 2025 09:22:30 +0000 (UTC) Received: by mail-yb1-f178.google.com with SMTP id 3f1490d57ef6-e3c8ae3a3b2so2787938276.0 for ; Sun, 16 Mar 2025 02:25:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742117101; x=1742721901; darn=lists.php.net; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=69w3PnlnXECsR3eu4+XRXDbzDGnEl5bsujPnwFesI40=; b=U91oci2r9b/Wv57fh23l/WDC6PFlUS1yBBuQsmtUoEI0ZQtUyKSiAPW1a1vsSxD6ZI AIqpNBqxUtHYB6x8RhfpqPPMbMg8cFyPOTOI5+wCye5t75e2GuyMh3MruQEdVSbR9ouN 2apu1+FOK3v5JP1IUFevN6Ok1vHNZthlto3jTevBHcfOxCuxhFTMjrruebu5QAjHmmba FI26aYshgmOfJTkHIfKq1qVU53cN/R/LF6E1BZcsmOWtzAyejxJTI4dAz3Pes+pC2cgH YpJoNwJllY5Y+/jtlRnQBvQMh6YGBx0XYbqnFbds5dxskT8LXhbBBdGOxUHm5ZjjKwn/ P7Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742117101; x=1742721901; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=69w3PnlnXECsR3eu4+XRXDbzDGnEl5bsujPnwFesI40=; b=VwOVa9I6FIZQNnljOvVRpAxpf3cznPuf3+1P9n8nPu5ETlYQSddgvT15q9IgzL78Qc DNRMSKIFyf77b+O0u95fUTA7MQRqfmjRock/YGqRRxQHdz+fFHL+Owlaqxxjv4LfEOjq UW/GLoA3xOpS1iGiBEE2Zkec0VPe4ShzjR3VacEO2kt6yBBt1QbHfEyVlD80zO7EqcUo StDvyRbGIzU01mY5FoM3pzjPaFqlueVK2O2UAEBlHa1BwHsGt6GGtoF8ywVNdzcCxdjm xOBSeWgau05q9SVb5QSPpIuhR+ZIuQEvP27Hkwf5ekAIQR6072JBNhBu+ulP1hebvmnG UqKg== X-Gm-Message-State: AOJu0Yx10Wdfwl+2cH3oTe7JW851s0VVv8xWPbjEQxwGCQOXGUs0M5rk fu4KdvA87MP42TJLHKAV9L7LKvUfpnPq/JQUlo19qZ1ZNlCBYXOYYu09Yo1UNkGl2ivNsfl/qWD o60lye/BmJCeh2rmcQ3+H/ryOW19LgBoZ X-Gm-Gg: ASbGncu1MgePqsZOSH6NFWXNE5CHwLRENPyxZA17UZPM+Tyq4LV10CcrcPiEz0CeZvH 0o6+LpSepAkh0EDFyqJ2WRLWdMvF4IErTiyJSSo8o/0sKQ3WR+q9ImdFAHDuRLvB+GmoHKKNaF+ FJ4Gy/rkFc5ImsiM8aLyxYYATRfQ== X-Google-Smtp-Source: AGHT+IGPCOOdRNBUKoBfq3GEn82vBtvJ604tDLeji7i9xwZzJ2pxNRn8Ca/zQT6K2Z8i7AwPxkppMRvrdwMpzMpAAC4= X-Received: by 2002:a05:6902:2785:b0:e57:4226:8ae0 with SMTP id 3f1490d57ef6-e63f64f757fmr10300380276.18.1742117101313; Sun, 16 Mar 2025 02:25:01 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Sun, 16 Mar 2025 11:24:51 +0200 X-Gm-Features: AQ5f1Jp7VZ4vMdZtPMu4ljI0gYB9G3BAmE0NquLBkx_i5mKRi0T_KXMDR_lQhDU Message-ID: Subject: [PHP-DEV] PHP True Async RFC - Stage 2 To: php internals Content-Type: multipart/alternative; boundary="000000000000fb296f0630723e77" From: edmond.ht@gmail.com (Edmond Dantes) --000000000000fb296f0630723e77 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Good day, everyone. I hope you're doing well. https://wiki.php.net/rfc/true_async Here is a new version of the RFC dedicated to asynchrony. Key differences from the previous version: * The RFC is not based on Fiber; it introduces a separate class representation for the asynchronous context. * All low-level elements, including the Scheduler and Reactor, have been removed from the RFC. * The RFC does not include Future, Channel, or any other primitives, except those directly related to the implementation of structured concurrency. The new RFC proposes more significant changes than the previous one; however, all of them are feasible for implementation. I have also added PHP code examples to illustrate how it could look within the API of this RFC. I would like to make a few comments right away. In the end, the Kotlin model lost, and the RFC includes an analysis of why this happened. The model that won is based on the Actor approach, although, in reality, there are no Actors, nor is there an assumption of implementing encapsulated processes. On an emotional level, the chosen model prevailed because it forces developers to constantly think about how long coroutines will run and what they should be synchronized with. This somewhat reminded me of Rust=E2=80= =99s approach to lifetime management. Another advantage I liked is that there is no need for complex syntax like in Kotlin, nor do we have to create separate entities like Supervisors and so on. Everything is achieved through a simple API that is quite intuitive. Of course, there are also downsides =E2=80=94 how could there not be? But considering that PHP is a language for web server applications, these trade-offs are acceptable. I would like to once again thank everyone who participated in the previous discussion. It was great! --000000000000fb296f0630723e77 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Good day, everyone. I hope you're doing well.

=

Here is a new v= ersion of the RFC dedicated to asynchrony.

Key differences from the = previous version:

* The RFC is not based on Fiber; it introdu= ces a separate class representation for the asynchronous context.
* All = low-level elements, including the Scheduler and Reactor, have been removed = from the RFC.
* The RFC does not include Future, Channel, or any other p= rimitives, except those directly related to the implementation of structure= d concurrency.

The new RFC proposes more significant changes than th= e previous one; however, all of them are feasible for implementation.
I have also added PHP code examples to illustrate how it could look withi= n the API of this RFC.

I would like to make a = few comments right away. In the end, the Kotlin model lost, and the RFC inc= ludes an analysis of why this happened. The model that won is based on the = Actor approach, although, in reality, there are no Actors, nor is there an = assumption of implementing encapsulated processes.

On an emotional l= evel, the chosen model prevailed because it forces developers to constantly= think about how long coroutines will run and what they should be synchroni= zed with. This somewhat reminded me of Rust=E2=80=99s approach to lifetime = management.

Another advantage I liked is that there is no need for c= omplex syntax like in Kotlin, nor do we have to create separate entities li= ke Supervisors and so on. Everything is achieved through a simple API that = is quite intuitive.

Of course, there are also downsides =E2=80=94 ho= w could there not be? But considering that PHP is a language for web server= applications, these trade-offs are acceptable.

I would like to once again thank everyone who participated in the previou= s discussion. It was great!=C2=A0=C2=A0
--000000000000fb296f0630723e77--