Revolt is a rock-solid event loop for concurrent PHP applications.
Traditionally, PHP has a synchronous execution flow, doing one thing at a time. If you query a database, you send the query and wait for the response from the database server in a blocking manner. Once you have the response, you can start doing the next thing.
Instead of sitting there and doing nothing while waiting, we could already send the next database query, or do an HTTP call to an API. Making use of the time we usually spend on waiting for I/O can speed up the total execution time.
A single scheduler – also called event loop – is required to allow for cooperative multitasking, which this package provides.
This package can be installed as a Composer dependency.
composer require revolt/event-loop
This installs the basic building block for building concurrent applications in PHP.
Documentation can be found on
Extensions are only needed if your application necessitates a high numbers of concurrent socket connections, usually this limit is configured up to 1024 file descriptors.
Examples can be found in the
./examples directory of this repository.
revolt/event-loop follows the semver semantic versioning specification.
The MIT License (MIT). Please see
LICENSE for more information.
Revolt is the result of combining years of experience of amphp's and ReactPHP's event loop implementations.