High-Performance GRPC server for PHP applications
Fund package maintenance!
Installs: 198 137
- php: >=8.1
- ext-json: *
- google/common-protos: ^3.1
- google/protobuf: ^3.7
- spiral/goridge: ^4.0
- spiral/roadrunner: ^2023.1
- spiral/roadrunner-worker: ^3.0
- jetbrains/phpstorm-attributes: ^1.0
- mockery/mockery: ^1.4
- phpunit/phpunit: ^10.0
- vimeo/psalm: >=5.8
RoadRunner GRPC is an open-source (MIT) high-performance PHP GRPC server build at top of RoadRunner. Server support both PHP and Golang services running within one application.
- native Golang GRPC implementation compliant
- minimal configuration, plug-and-play model
- very fast, low footprint proxy
- simple TLS configuration
- debug tools included
- Prometheus metrics
- middleware and server customization support
- code generation using
protocplugin (Plugin can be downloaded from the roadrunner releases page)
- transport, message, worker error management
- response error codes over php exceptions
- works on Windows
protoc-gen-php-grpc by building it or
use pre-build binaries.
Define your service schema using proto file. You can scaffold protobuf classes and GRPC service interfaces using:
$ protoc --php_out=target-dir/ --php-grpc_out=target-dir/ sample.proto
Make sure to install protoc compiler and run
composer require spiral/roadrunner-grpcfirst
Implement needed classes and create worker.php to invoke your services.
Install rr and place .rr.yaml (or any other format supported by viper configurator) into the root of your project. You can run your application now:
$ rr serve
You can find more details regarding server configuration at RoadRunner Wiki.
MIT License (MIT). Please see
LICENSE for more information. Maintained