grpc / grpc-kotlin

Kotlin gRPC implementation. HTTP/2 based RPC
https://grpc.io/docs/languages/kotlin
Apache License 2.0
1.2k stars 166 forks source link

Unix Domain Socket support? #367

Open scholarsmate opened 2 years ago

scholarsmate commented 2 years ago

The core gRPC C++ implementation has first-class support for Unix Domain Sockets (UDS). Any chance of having UDS support in this project?

scholarsmate commented 2 years ago

I looked into this further, and Unix Domain Sockets have been given the "first-class treatment" in Java 16+. Prior to 16, it appears you need to rely on native (JNI) wrappers around epoll (Linux), and kqueue (macOS) (ref: https://stackoverflow.com/questions/54179843/how-to-create-a-grpc-service-over-a-local-socket-rather-then-inet-in-scala-java). Windows now has domain socket support as well, so we can finally have a nice cross-platform, local socket experience (ref: https://www.baeldung.com/java-unix-domain-socket). The downside is the Java 16+ requirement, which will likely be the main blocker.