I understand. Seems that, at the end of the day, time will tell if their 
"way to standardize async" is good enough for the community to be widely 
used, specially on the stability side.

I don't think it would be harm to require in the future a `php-async/loop` 
and `php-async/promise` packages abstractions so a developer can choose 
*how* it wants to run them on. It just that, without FIG backing, these 
libraries will have to deal with promoting the common interface themselves.
On Friday, May 7, 2021 at 10:05:06 AM UTC-4 Larry Garfield wrote:

> On Thu, May 6, 2021, at 4:06 PM, Italo Baeza Cabrera wrote:
> > With the former inclusion of PHP Fibers in 8.1, it's widely known that 
> > next async frameworks like ReactPHP and Amp will start using PHP Fibers 
> > internally, while extensions like Swoole and 
> > 
> > While both of these frameworks are compatible, there is no guaranteed 
> > interoperability between async libraries.
> > 
> > Seems that the common offering from these libraries are Event Loops 
> > (run tasks until error or no task is left) and Promises (execute now, 
> > wait for value later) that represent the state of a callback sent to 
> > the Event Loop where its sent.
> > 
> > I humbly think that an hypothetical PSR-21 would allow interoperability 
> > by abstraction, at least, once Fibers are published at the end of the 
> > year.
>
> I have spoken to Aaron P (author of the Fibers RFC and Amp) extensively on 
> this topic. The current plan is that Amp and React will co-develop a common 
> loop and promise library that both end up using. That will effectively make 
> it the de facto standard in the PHP ecosystem anyway. They would then both 
> build different convenience APIs on top of the core plumbing.
>
> I've suggested several times that FIG is happy to help as part of the 
> standards process, but they seem comfortable doing their own thing 
> independently. We're definitely happy to have such standards, but it has to 
> be driven by the domain experts in that area for it to have any value, and 
> so far the domain experts seem happy to collaborate independently of FIG.
>
> --Larry Garfield
>

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/330aa77c-e7d8-4d92-8159-7787024af37fn%40googlegroups.com.

Reply via email to