• This repository has been archived on 21/Jan/2022
  • Stars
    star
    476
  • Rank 91,923 (Top 2 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 6 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🔌 Fast and furious GRPC server for PHP applications

⚠️ RRv2 protoc-gen-php-grpc releases are here: https://github.com/roadrunner-server/roadrunner/releases ⚠️
⚠️ PHP Client for the RRv2 is here: https://github.com/spiral/roadrunner-grpc ⚠️

PHP-GRPC

Latest Stable Version GoDoc Tests Linters 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.

Note:

For the RoadRunner v2, please use the RR-GRPC library.

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.

More Repositories

1

jobs

RoadRunner: Background PHP workers, Queue brokers
Go
59
star
2

database

Database Abstraction Layer, Schema Introspection, Schema Generation, Query Builders
PHP
53
star
3

roadrunner-binary

💾 High-performance PHP application server, load-balancer and process manager written in Golang. RR2 releases repository.
Go
44
star
4

app-1.0

[DEPRECATED] Skeleton Spiral Application optimized for Web and SAAS applications
CSS
14
star
5

orm

ORM with transaction scopes (UoW), repositories, in-memory mocking, hybrid databases, logical partitions, full database scaffolding, recursive relations, polymorphic relations, relations to interfaces (static analysis tools included)
PHP
14
star
6

websocket-client

JavaScript client for websockets broadcast.
TypeScript
7
star
7

installer

The package has been developed for the Spiral Framework, providing a convenient command line interface for installing and configuring the framework and any desired packages. This makes it simple for developers to get started with Spiral.
PHP
7
star
8

migrations

Database migrations, migration scaffolding
PHP
6
star
9

common

Spiral, Core Components: Static IoC scopes, Debug, Files
PHP
6
star
10

ide-helper

IDE helper: ORM, ODM, Container, SharedTrait
PHP
6
star
11

components

[DEPRECATED] Spiral Components, Meta package
5
star
12

broadcast

PHP
4
star
13

broadcast-ws

Broadcasting over websockets
Go
4
star
14

vault

Domain core for Admin panel with RBAC integration and visual components
CSS
4
star
15

odm

Compositable ODM with strict data schemas, model inheritance, embedded models, atomic operations support, build on latest MongoDB drivers.
PHP
3
star
16

transactions

Stripe transactions integration and Vault controls
PHP
3
star
17

listing

ORM/ODM selection paginator, filter, search and sort wrapper [+ view widget]
PHP
3
star
18

sitemaps

Sitemap generator
PHP
2
star
19

statistics

Statistics module. Allows to track internal events, extract them for charts.
PHP
2
star
20

helpers

Spiral, Helpers Set
PHP
2
star
21

cropper

Image cropper virtual tag for spiral forms (dark templates)
JavaScript
2
star
22

snapshotter

Snapshots management
PHP
2
star
23

log-viewer

Logs management module. Log files with all rotations are now available via vault panel, you can view them and, if needed, remove.
PHP
2
star
24

phpFastCache-bridge

phpFastCache Bridge
PHP
2
star
25

asyncapi-go-template

🌠 This template generates Go structures as a package for building event-driven applications
JavaScript
2
star
26

template

Empty component template with GHA scripts enabled.
PHP
1
star
27

cms-pages

Editable CMS pages with ability to assign to any URl
PHP
1
star
28

cms-pieces

Editable CMS pieces and Images
PHP
1
star
29

charts

Render google ga-embed charts and charts with internal statistics
PHP
1
star
30

annotations

[READ ONLY] Automatic Annotation Discovery. Subtree split of the Spiral Annotations component (see spiral/framework)
PHP
1
star