grpc / grpc-java

The Java gRPC implementation. HTTP/2 based RPC
https://grpc.io/docs/languages/java/
Apache License 2.0
11.37k stars 3.82k forks source link

Proposal: JDK-only server implementation (repurposed OkHttp Server) #11545

Open bsideup opened 3 days ago

bsideup commented 3 days ago

Is your feature request related to a problem?

Currently, there is no "zerodep" transport that uses JDK types only

Describe the solution you'd like

Repurpose OkHttpServer that does not in fact depend on OkHttp (only Okio but even that dependency can be removed) as a generic JDK-only server implementation.

Describe alternatives you've considered

Existing servers work fine but sometimes cause version conflicts. Also, Netty remains the reference server, and, while being performant, its implementation is harder to follow due to the async nature and Netty's way of doing things.

Additional context

I am working on https://github.com/bsideup/grpc-bidi ("push" for gRPC, a.k.a. client-side channels) and it needs to expose itself as a server, with ClientCall being the transport. Currently, it uses the Netty server impl, but it is rather complex, plus requires a heavyweight dependency.

ejona86 commented 3 days ago

What version conflict is there with grpc-okhttp? Sounds like you want something small, and that is what grpc-okhttp is intended for. You would need to make a much stronger case for a new transport implementation. (I don't really see any real argument here; I just see an assertion.)