Skip to content

🔌 Fast and furious GRPC server for PHP applications

License

Notifications You must be signed in to change notification settings

real-digital/php-grpc

This branch is 4 commits ahead of, 52 commits behind spiral-modules/php-grpc:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3bf87bd Â· Aug 31, 2020
Aug 31, 2020
Jul 30, 2020
Jul 30, 2020
Jan 27, 2020
Nov 30, 2019
May 24, 2019
Jan 30, 2019
Jul 30, 2020
Jul 30, 2020
Jan 3, 2020
Aug 1, 2020
Oct 20, 2018
Jan 13, 2020
Sep 6, 2019
Jun 8, 2020
Aug 1, 2020
Oct 20, 2018
Jul 30, 2020
May 5, 2020
Jul 30, 2020
Jul 30, 2020
May 25, 2020
Jul 20, 2020
Oct 20, 2018
Jul 30, 2020
Jul 30, 2020
May 5, 2020
Jul 30, 2020
Jul 30, 2020
Jul 30, 2020

Repository files navigation

PHP-GRPC

Latest Stable Version GoDoc Build Status Go Report Card Total alerts Codecov

PHP-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.

Documentation:

Features:

  • 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 protoc plugin (go get github.com/spiral/php-grpc/cmd/protoc-gen-php-grpc)
  • transport, message, worker error management
  • response error codes over php exceptions
  • works on Windows

Usage:

Install rr-grpc and 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/php-grpc first

Implement needed classes and create worker.php to invoke your services.

Place .rr.yaml (or any other format supported by viper configurator) into the root of your project. You can run your application now:

$ rr-grpc serve -v -d

To reset workers state:

$ rr-grpc grpc:reset

To show workers statistics:

$ rr-grpc grpc:workers -i

See example.

You can find more details regarding server configuration at RoadRunner Wiki.

License:

MIT License (MIT). Please see LICENSE for more information. Maintained by SpiralScout.

About

🔌 Fast and furious GRPC server for PHP applications

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 62.3%
  • PHP 35.7%
  • Shell 1.6%
  • Makefile 0.4%