Provides abstractions for working with the gRPC protocol over HTTP/2.
protocol-grpc provides protocol-level abstractions for building gRPC applications:
- Protocol-level abstractions - No networking, no client/server implementations. Focuses on gRPC protocol details.
- Message framing - Handles gRPC's 5-byte length-prefixed message format with compression support.
- Status codes and error handling - Complete gRPC status code support with error hierarchy.
- Metadata and trailers - Full support for gRPC metadata headers and HTTP trailers.
- Interface definitions - Define service contracts using
Protocol::GRPC::Interfacewith PascalCase method names matching.protofiles. - Middleware pattern - Abstract base class for building gRPC server applications.
- Call context - Track deadlines, metadata, and request context for each RPC call.
Following the same pattern as protocol-http, this gem provides only protocol abstractions. Client and server implementations are built on top in separate gems (e.g., async-grpc).
Please see the project documentation for more details.
- Getting Started - This guide explains how to use
protocol-grpcfor building abstract gRPC interfaces.
Please see the project releases for all releases.
- Add
RPC#name.
- Breaking:
Protocol::GRPC::Callnow takes aresponseobject parameter instead of separateresponse_headers. - Breaking: Removed
Call#response_headersmethod. Usecall.response.headersdirectly. - Added
RPC#streaming?method to check if an RPC is streaming.
RPC#methodis always defined (snake case).
- Initial design.
- async-grpc — Asynchronous gRPC client and server implementation using this interface.
- protocol-http — HTTP protocol abstractions that gRPC builds upon.
- async-http — Asynchronous HTTP client and server, supporting HTTP/2 which gRPC requires.
We welcome contributions to this project.
- Fork it.
- Create your feature branch (
git checkout -b my-new-feature). - Commit your changes (
git commit -am 'Add some feature'). - Push to the branch (
git push origin my-new-feature). - Create new Pull Request.
In order to protect users of this project, we require all contributors to comply with the Developer Certificate of Origin. This ensures that all contributions are properly licensed and attributed.
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.