You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor: Decouple gRPC module using server-agnostic SPI
This commit removes the gRPC module's tight coupling to Jooby's core
request lifecycle (`Context` and `Sender`) and introduces a clean,
zero-dependency Service Provider Interface (SPI). This prevents gRPC
specifics (like HTTP/2 trailers and framing) from polluting the
standard HTTP/1.1 pipeline.
Core changes:
- Add `GrpcExchange` and `GrpcProcessor` SPI to `jooby-core`.
- Refactor `UnifiedGrpcBridge` to act as a pure protocol bridge using
Java `Flow` and `ByteBuffer`, entirely isolated from web core classes.
- Fix circular dependencies in the reactive `GrpcRequestBridge`.
Server Implementations:
- Jetty: Implement `JettyGrpcExchange` and `JettyGrpcInputBridge`.
Fixed early commit issues by eagerly registering `TrailersSupplier`.
- Netty: Implement `NettyGrpcExchange` and `NettyGrpcInputBridge`.
Map trailing headers natively via `LastHttpContent` and properly
intercept HTTP/2 pipeline streams.
- Undertow: Implement `UndertowGrpcExchange`, `UndertowGrpcInputBridge`,
and remove hardcoded gRPC checks from standard `UndertowHandler`.
Fixed XNIO non-blocking event loop stalls using `wakeupReads()` and
implemented manual, synchronous `StreamSinkChannel` flushing to prevent
bidirectional deadlocks.
All three servers now handle reactive backpressure natively and achieve
100% compliance with strict HTTP/2 clients like `grpcurl`.
0 commit comments