Download the PHP package fadhila36/grpcavel without Composer

On this page you can find all versions of the php package fadhila36/grpcavel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package grpcavel

Grpcavel

Latest Version on Packagist License Tests

Grpcavel is a gRPC framework for Laravel that focuses on developer experience. It uses a code-first approach to generate and compile protobuf files, meaning you don't have to write .proto definitions manually.

Why Grpcavel?

Building gRPC services in PHP is traditionally painful. Grpcavel makes it feel like building a standard Laravel API:

Why Grpcavel over Node.js or Golang?

For many engineering teams, Laravel serves as the core application stack. Grpcavel was designed to empower PHP developers with the raw performance and efficiency of gRPC, eliminating the need to adopt new languages or fragment the technology stack solely for inter-service communication.

By leveraging RoadRunner's persistent worker architecture, Grpcavel delivers performance that challenges traditional PHP limitations. The goal is not to replace Go or Node.js, but to provide a seamless, high-performance gRPC implementation tailored specifically for the Laravel ecosystem.

Key Use Cases

Benchmarks

Grpcavel leverages RoadRunner's persistent worker model, yielding performance that significantly outpaces traditional PHP-FPM setups.

Here is a real benchmark conducted on a local development machine (Laptop) simulating a real-world scenario with Database Interaction (reading from SQLite):

Setup Requests per Second (RPS) Total Requests Concurrency Success Rate
Grpcavel (RoadRunner) ~140 RPS 1,000 50 100%

Benchmark Details

Note: This is a real-world benchmark involving database I/O. For simple "echo" or non-DB services, performance can reach thousands of requests per second.

Compatibility

Grpcavel is tested against multiple Laravel and PHP versions to ensure stability:

Laravel Version PHP Version
10.x 8.2, 8.3
11.x 8.2, 8.3, 8.4
12.x 8.2, 8.3, 8.4
13.x 8.3, 8.4

Documentation

Full documentation is available at github.com/Fadhila36/grpcavel-docs.

Installation

You can install the package via composer:

After installing, run the install command to prepare the environment:

Usage

1. Create a Service

Generate a new service class using Artisan:

2. Define Methods

Annotate your service methods with #[GrpcMethod]. Each method must accept one request DTO and return one response DTO.

3. Validation

Define rules in your request DTO by extending GrpcRequest:

4. Synchronization

Sync your PHP definitions with .proto files and compile the stubs:

5. Start the Server

Start the RoadRunner gRPC server:

Middleware

You can apply middleware to services or individual methods using attributes:

Enterprise Features

Rate Limiting

Protect your services from abuse using the built-in RateLimitMiddleware. Configure limits in config/grpc.php and apply it to your services:

Docker Support

Deploy with confidence using the included production-optimized Dockerfile. It handles PHP 8.3, RoadRunner binaries, and necessary extensions out of the box.

Client Scaffolding

Generate client-side wrappers to facilitate communication between microservices:

Testing

Grpcavel provides a GrpcClient to test your services in-process:

Production Optimization

Service Discovery Cache

In production, you can cache your service definitions to avoid the overhead of scanning directories and using reflection:

To clear the cache:

Runtime Stability

Grpcavel is hardened for long-lived processes:

Commands Reference

Command Description
grpc:install Bootstrap directories and config.
grpc:sync Generate and compile proto files.
grpc:compile Manually compile proto files.
grpc:cache Create service discovery cache.
grpc:clear Remove service discovery cache.
grpc:start Start the gRPC server.
grpc:make-service Create a new service.
grpc:make-client Create a client wrapper.
grpc:make-request Create a request DTO.
grpc:make-response Create a response DTO.

Support the Project

If you find Grpcavel helpful, please consider giving it a star ⭐ on GitHub! It helps more developers discover the project and motivates us to keep improving it.

Star History Chart

Open Source & Contributing

Grpcavel is an open-source project, and we welcome contributions from the community! Whether it's reporting a bug, proposing a new feature, or submitting a Pull Request, your help is highly appreciated.

If you're interested in contributing, please feel free to fork the repository and submit a PR. For major changes, please open an issue first to discuss what you would like to change.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of grpcavel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
google/protobuf Version ^4.33
spiral/roadrunner-grpc Version ^3.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fadhila36/grpcavel contains the following files

Loading the files please wait ...