Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126409 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 1604A1A00BC for ; Fri, 14 Feb 2025 13:28:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1739539539; bh=096BBlQ9dECAVNSaxJhor2nEartWdynYlxsnSfLX6PE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=PIiiqUuUqtgoGp7HY8WaqYlc/6QNrVakGlS4kOhICmJi39oyi87Py/cdG807N9R// e+9inXfo5tGsn0xFPvnxekj2AWRBTZM1k1VjnW0LTPvcBOLYoY2VWADxP3p3eaiXuL 9WiaTm2I7eyodbW32iDplFLUKCrYAMXQXRzxMoRTuoT4yK2s9Q64Dja8PWtVuf2S0G eNzJ2B6dbtccCTP2WNnTg4x3LCM9cNQJLEFLslB4jiQRfY2RSubNQmsU2dRZKOLxRi BZftp2FzgqKdbtl3pAdiMIOijkTEyGd4BcrgzPOgQ+qXHgcOXGrxuHcpVROtkCTj8e u5gCj8WM2Mu9g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 78C21180050 for ; Fri, 14 Feb 2025 13:25:38 +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=0.2 required=5.0 tests=BAYES_50,DMARC_NONE, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, 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-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) (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 ; Fri, 14 Feb 2025 13:25:38 +0000 (UTC) Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-2bc56e74e75so752738fac.3 for ; Fri, 14 Feb 2025 05:28:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739539700; x=1740144500; 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=fSnY+YJrUpmect8aCQUJXDuB7H9UbRvkVX547O5cf+Y=; b=YLHGjaRumEOU869ES6qmKi2w79MC/gERBGfLHctg7pHZM6Y0V6nXM7Kq9JR2uZiUS5 6BFQnIZQ4RK+pAOpGCIlT3TnvU8rhiy1oXjVOAxnHI6BuPESR+/sLauOfGT00yzYfHVZ LeOt1dMxjKqD/tJ3AZxJhU/X9nEB+Vxiwqin2lxtVXlbOenGD6Se5qCIHYWf1hjCK5x9 TYa6wdJROBpSsW0RiXTePNSWZ5lVqaZdvDoGUYfmPIrzQi2wt5iiWv+Rl4pbCuO/Iq7E SnsX8edehJ8Te/SM6VSDTNzlVkqqD+Xq6ipfw2G/ltjMNmGrGPj3dMk3J94p4Pbd9Lmo vE6Q== X-Gm-Message-State: AOJu0YzFL6qrb3i1+LQ0JqJVxE6u0IuQrJm3Uv1fffynQFAoAtbk3m11 RR04F/feoESPJZSS2rfWQIvgo38GvqgtEZeKUQt4cBFx7D3NgrcZQUFJJWUlBInLY7LkKhuWWa7 W1Bp3Ryoq9zW2JGFDscXfsPl2nis= X-Gm-Gg: ASbGnctmwWNaqu5SwIxisU84j5vj1xgNe2qz5J3mPlEgRQH+qHfmD1KN7ryR3sbwaF0 wnUWZk+Z0BmHrXn/uszQTjsIFnk0b3El1u0F3Hwndse41JyAuU53dqQgeqLRyjCQGvIi8ug== X-Google-Smtp-Source: AGHT+IGxjso+82T7SMxkH360X/Esjmcy6zWMfvD404M9YeSpK9fhfUWYrM9KrwmISO5RKIzQ8Wxx7KXPwn8chUCr5Xo= X-Received: by 2002:a05:6871:588:b0:296:e491:b244 with SMTP id 586e51a60fabf-2b8f8fe3658mr4374980fac.32.1739539698483; Fri, 14 Feb 2025 05:28:18 -0800 (PST) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 14 Feb 2025 14:28:07 +0100 X-Gm-Features: AWEUYZk4K7Hon2HonlHpabU95sHCVszXJ4O8wwHNj5JxKUOVjWEiVvYl2WrzlEM Message-ID: Subject: Re: [PHP-DEV] PHP True Async To: Edmond Dantes Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000cd0c81062e1a258a" From: bukka@php.net (Jakub Zelenka) --000000000000cd0c81062e1a258a Content-Type: text/plain; charset="UTF-8" > > >> A brief overview of what this RFC will cover: >> >> 1. *True* asynchronous support for PHP core functions without >> additional "tricks." >> 2. *Scheduler* and *Reactor* components, providing a C-API for PHP >> extensions to enable non-blocking I/O in plugins or core code. >> 3. *User-Land API* that mirrors the C-API for PHP developers. >> 4. Basic primitives for concurrent programming, such as *Channel* and >> *Iterator*. >> 5. *Built-in* integration with the *LibUV* library. >> >> The library is based on *Fiber*, extending and enhancing it to provide >> PHP developers with a full set of tools for concurrent applications. >> > > Looks interesting. I understand that's not ready for review yet but > quickly checked the code anyway. Is there some particular reason why this > is not an extension? Think it might actually make sense to split it to two > extensions - one for the core main stuff (that could be enabled by default) > and then libuv optional part - similar to pdo for example. I haven't > checked too deeply the code though so I might be missing things. Feel free > to create a draft PR even if it's not ready. It might help to get some > initial pre-reviews... :) > > In terms of RFC, it would be good to also compare it with alternatives. From a quick look it slightly reminded me swow ( https://github.com/swow/swow ) but I didn't really look that deeply into it and I also don't know that much about swow so might be wrong. --000000000000cd0c81062e1a258a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


A brief overview of what this RFC will cover:

  1. True asynchronous support for PHP core functions without addition= al "tricks."
  2. Scheduler and React= or components, providing a C-API for PHP extensions to enable non-= blocking I/O in plugins or core code.
  3. User-Land API that mirrors the C-API for PHP developers.
  4. Basic primitives for c= oncurrent programming, such as Channel and Iterato= r.
  5. Built-in integration with the = LibUV library.

The library is based on Fiber, extending and enhancing it to provide PHP developers with a full s= et of tools for concurrent applications.


Looks interesting. I understand that's not ready for review yet= but quickly checked the code anyway. Is there some particular reason why t= his is not an extension? Think it might actually make sense to split it to = two extensions - one for the core main stuff (that could be enabled by defa= ult) and then libuv optional part - similar to pdo for example. I haven'= ;t checked too deeply the code though so I might be missing things. Feel fr= ee to create a draft PR even if it's not ready. It might help to get so= me initial pre-reviews... :)

<= div>
In terms of RFC, it would be good to also compare it wit= h alternatives. From a quick look it slightly reminded me swow (=C2=A0https://github.com/swow/swow ) but = I didn't really look that deeply into it and I also don't know that= much about swow so might be wrong.




--000000000000cd0c81062e1a258a--