Download the PHP package bardiz12/swoole-grpc without Composer
On this page you can find all versions of the php package bardiz12/swoole-grpc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bardiz12/swoole-grpc
More information about bardiz12/swoole-grpc
Files in bardiz12/swoole-grpc
Package swoole-grpc
Short Description GRPC abstraction for swoole to build high performance polygloat services
License Apache-2.0
Informations about the package swoole-grpc
Swoole gRPC for PHP
This library is a forked version of the original OpenSwoole gRPC library, designed specifically for use with the Swoole PHP Extensions. It provides a modern, high-performance, and coroutine-friendly gRPC server and client implementation for PHP, enabling scalable microservices and efficient inter-service communication. Thanks to
About
Swoole gRPC brings native gRPC support to PHP applications running on Swoole. It is a drop-in, improved, and actively maintained alternative to the OpenSwoole gRPC library, with a focus on code quality, extensibility, and developer experience.
This library is suitable for:
- Building high-performance PHP microservices with gRPC
- Integrating PHP with polyglot (multi-language) gRPC systems
- Leveraging Swoole's coroutine and async features for scalable RPC
Features
- Native gRPC protocol implementation (HTTP/2, Protobuf)
- Coroutine-based server and client for maximum concurrency
- Server-side streaming and unary RPC support
- Client connection pooling and multiplexing
- Middleware/interceptor support for authentication, logging, etc.
- Easy integration with generated PHP stubs from
.protofiles
Installation
Install via Composer:
Note: Requires the Swoole PHP Extension v6.0.0 or above to be installed and enabled.
Example Project
https://github.com/bardiz12/swoole-grpc-example
TODO
- [X] Create example usage of this library
- [ ] Initialize Unit Tests
- [ ] Handle Multiple HTTP Protocol handler (so we can just allocate 1 Swoole Server fot HTTP/1.1 and HTTP/2.0)
- [ ] Handle Stream Request
- [ ] Refactor Client Pool
Getting Started
- Define your service in a
.protofile - Generate PHP stubs using protoc-gen-swoole-grpc or compatible tools
- Implement your service logic using the generated classes
- Start the gRPC server using Swoole
- Connect with a gRPC client (PHP or any other language)
Documentation
- Refer to the Swoole documentation for server setup and coroutine usage
License
MIT. See LICENSE.
All versions of swoole-grpc with dependencies
ext-swoole Version >=6.0.0
psr/log Version ^3.0
psr/container Version ^2.0