PHPackages                             hetao29/php-grpc-server-protobuf - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. hetao29/php-grpc-server-protobuf

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

hetao29/php-grpc-server-protobuf
================================

The php grpc server framework with protobuf and DO NOT use any 3rd libraries.

1.7.6(1y ago)929MITPHP

Since Jan 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/hetao29/php-grpc-server-protobuf)[ Packagist](https://packagist.org/packages/hetao29/php-grpc-server-protobuf)[ Docs](https://github.com/hetao29/php-grpc-server-protobuf)[ RSS](/packages/hetao29-php-grpc-server-protobuf/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (20)Used By (0)

php-grpc-server-protobuf
========================

[](#php-grpc-server-protobuf)

The php grpc server framework with protobuf and DO NOT use any 3rd libraries or use Swoole. Support protobuf and json request.

Architecture
============

[](#architecture)

mode with nginx &amp; php-fpm (only support php client and http json request)
-----------------------------------------------------------------------------

[](#mode-with-nginx--php-fpm-only-support-php-client-and-http-json-request)

1. gRPC Client =&gt; nginx =&gt; php-fpm =&gt; this framework =&gt; custom services =&gt; protobuf binary response
2. http/https json request (content-type:application/json) =&gt; nginx =&gt; php-fpm =&gt; this framework =&gt; custom services =&gt; json response

mode with swoole (all gRPC Client and http json request)
--------------------------------------------------------

[](#mode-with-swoole-all-grpc-client-and-http-json-request)

1. gRPC Client =&gt; Swoole =&gt; this framework =&gt; custom services =&gt; protobuf binary response
2. http/https json request (content-type:application/json) =&gt; Swoole =&gt; this framework =&gt; custom services =&gt; json response

Usage
=====

[](#usage)

1. install with composer

```
composer require "hetao29/php-grpc-server-protobuf:dev-main"
```

2. use in php file, like samples/www/index.php (php-fpm mode)

```
