event-loop
react-fiber
Our great sponsors
event-loop | react-fiber | |
---|---|---|
4 | 1 | |
1,194 | 21 | |
1.0% | - | |
5.3 | 0.0 | |
2 months ago | over 2 years ago | |
PHP | PHP | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
event-loop
-
Getting started with asynchronous PHP using ReactPHP
ReactPHP has various components, such as the event loop, promise, and streams. When you install ReactPHP, these components and a few more are installed, so you don’t have to install the separately.
-
Where does PHP being single threaded affect performance and can anything be done to make it better?
For that things PHP usually uses external help in form of queues in Redis or other DBs. And then one process which spawn other ones. Did you heard about Event Loop, pcntl_fork() and php-cli from crontab? That solves the whole problem in the world before Fibers.
-
Does PHP really not support asynchronous calls natively?
It can run without an extension, but for best performance, one of libuv, libev or libevent should be installed to accelerate performance, otherwise it uses stream_select() which doesn't require an extension but has worse performance. See https://github.com/reactphp/event-loop#loop-implementations
-
What is best and easiest library (packagist) for async process in PHP?
which package? is it reactphp/event-loop?
react-fiber
-
Maintainer of Swoole about the Fibers RFC: "I am afraid that fiber can only be used in the amphp framework and is of no value to other php projects."
Aaron and Niklas also took the time, as mentioned in the RFC, to build a proof of concept/reference implementation to add support for fibers to ReactPHP.
What are some alternatives?
React - Event-driven, non-blocking I/O with PHP.
ReactPHP Promises Testing - PHPUnit assertions for testing ReactPHP promises
laravel-route-attributes - Use PHP 8 attributes to register routes in a Laravel app
PHP-watcher - Monitor for any changes in your php application and automatically restart it (suitable for async apps).
parallel - A succinct parallel concurrency API for PHP8
excelize - Go language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
mysql-dbal
socket - Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP.
Recoil - Asynchronous coroutines for PHP 7.
RfcCodex - Notes on PHP RFCs, and topics that occur repeatedly on PHP internals
pph - ✨A simple transpiler that makes writing PHP easier.