GithubHelp home page GithubHelp logo

yijiangwen / php-grpc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spiral-modules/php-grpc

0.0 1.0 0.0 12.62 MB

:electric_plug: Fast and furious GRPC server for PHP applications

License: MIT License

PHP 35.77% Go 62.24% Makefile 0.39% Shell 1.60%

php-grpc's Introduction

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.

php-grpc's People

Contributors

wolfy-j avatar rustatian avatar wolfgang-braun avatar yamensarah avatar hgkmail avatar everflux avatar evsign avatar ganl avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.