2013-08-05 22:05:08 +02:00
|
|
|
# Alert
|
|
|
|
|
2013-11-24 17:30:03 +01:00
|
|
|
Alert provides native and libevent event reactors for powering event-driven PHP applications
|
2013-12-02 17:14:32 +01:00
|
|
|
and servers.
|
|
|
|
|
|
|
|
#### WHY?
|
|
|
|
|
|
|
|
Buffer and event-emmitter abstractions -- though user-friendly -- are unfortunately slow in userland.
|
|
|
|
Performant PHP servers cannot compete (in terms of speed) with the likes of Node.js where such features
|
2014-04-27 06:12:58 +02:00
|
|
|
are compiled. Alert avoids these features and provides *only* non-blocking IO, timer and signal
|
|
|
|
events to prevent OOP slowness in the overlying application. It's a stripped down, no-frills event
|
|
|
|
reactor that "just works."
|
2013-11-24 17:30:03 +01:00
|
|
|
|
|
|
|
#### FEATURES
|
|
|
|
|
2013-12-02 17:14:32 +01:00
|
|
|
Alert adds the following functionality to PHP's non-blocking IO space:
|
2013-11-24 17:30:03 +01:00
|
|
|
|
2014-04-27 06:12:58 +02:00
|
|
|
- Pausing/resuming *individual* event/signal/IO observers
|
2013-11-24 17:30:03 +01:00
|
|
|
- Assigning multiple watchers for individual streams
|
2013-08-05 22:05:08 +02:00
|
|
|
|
|
|
|
#### DEPENDENCIES
|
|
|
|
|
|
|
|
* PHP 5.4+
|
2014-06-12 16:52:37 +02:00
|
|
|
* (optional) [php-uv](https://github.com/chobie/php-uv) for libuv backends.
|
|
|
|
* (optional) [*PECL libevent*][libevent] for libevent backends. Windows libevent extension DLLs available [here][win-libevent]
|
2013-08-05 22:05:08 +02:00
|
|
|
|
|
|
|
#### INSTALLATION
|
|
|
|
|
2014-07-22 17:56:44 +02:00
|
|
|
###### Composer:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ php composer.phar require rdlowrey/alert:0.9.*
|
|
|
|
```
|
|
|
|
|
2013-08-05 22:05:08 +02:00
|
|
|
###### Git:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ git clone https://github.com/rdlowrey/alert.git
|
|
|
|
```
|
|
|
|
###### Manual Download:
|
|
|
|
|
|
|
|
Manually download from the [tagged release][tags] section.
|
|
|
|
|
|
|
|
[tags]: https://github.com/rdlowrey/alert/releases "Tagged Releases"
|
|
|
|
[libevent]: http://pecl.php.net/package/libevent "libevent"
|
|
|
|
[win-libevent]: http://windows.php.net/downloads/pecl/releases/ "Windows libevent DLLs"
|