spiral / roadrunner-worker
RoadRunner: PHP worker
Installs: 1 035 608
Dependents: 12
Suggesters: 0
Security: 0
Stars: 10
Watchers: 7
Forks: 2
Open Issues: 1
Requires
- php: >=7.4
- composer-runtime-api: ^2.0
- ext-json: *
- ext-sockets: *
- psr/log: ^1.0|^2.0|^3.0
- spiral/goridge: ^3.2.0
- symfony/polyfill-php80: ^1.23
Requires (Dev)
- jetbrains/phpstorm-attributes: ^1.0
- symfony/var-dumper: ^5.1
- vimeo/psalm: ^4.4
Suggests
- spiral/roadrunner-cli: Provides RoadRunner installation and management CLI tools
README
RoadRunner is an open-source (MIT licensed) high-performance PHP application server, load balancer, and process manager. It supports running as a service with the ability to extend its functionality on a per-project basis.
RoadRunner includes PSR-7/PSR-17 compatible HTTP and HTTP/2 server and can be used to replace classic Nginx+FPM setup with much greater performance and flexibility.
Official Website | Documentation
Repository:
This repository contains the common codebase for all binary roadrunner workers. Check spiral/roadrunner to access application server and spiral/roadrunner-http for PSR-7 compatible worker.
You can use the convenient installer to download the latest available compatible version of RoadRunner assembly:
$ composer require spiral/roadrunner-cli --dev
To download latest version of application server:
$ vendor/bin/rr get
Example:
To init abstract RoadRunner worker:
<?php require __DIR__ . '/vendor/autoload.php'; // Create a new Worker from global environment $worker = \Spiral\RoadRunner\Worker::create(); while ($data = $worker->waitPayload()) { // Received Payload var_dump($data); // Respond Answer $worker->respond(new \Spiral\RoadRunner\Payload('DONE')); }
Testing:
This codebase is automatically tested via host repository - spiral/roadrunner.
License:
The MIT License (MIT). Please see LICENSE
for more information. Maintained by Spiral Scout.