java-sdk icon indicating copy to clipboard operation
java-sdk copied to clipboard

Support domain socket

Open daixiang0 opened this issue 3 years ago • 6 comments

Describe the proposal

Ref https://github.com/dapr/dapr/issues/2864

UPDATE: DAPR_HTTP_ENDPOINT and DAPR_GRPC_ENDPOINT should also work with a local socket path instead of HTTP.

Users can specify the value of the socket path with the following value unix:/tmp/my-dapr.sock

Release Note

RELEASE NOTE: ADD support domain socket.

daixiang0 avatar Aug 20 '21 00:08 daixiang0

This needs a change in dapr/cli before this can be picked up.

mukundansundar avatar Sep 10 '21 02:09 mukundansundar

I believe domain socket support was added to Java in version 16 with JEP-380. As a consequence, if we want to support older versions of Java as well, we should have a fallback strategy to HTTP or gRPC.

mthmulders avatar Sep 10 '21 07:09 mthmulders

Hi, my name is Ye Yuan and will attend Open Source Day '23. I'm interested in this issue!

YEthYuan avatar Sep 16 '23 05:09 YEthYuan

I believe domain socket support was added to Java in version 16 with JEP-380. As a consequence, if we want to support older versions of Java as well, we should have a fallback strategy to HTTP or gRPC.

I found the implementation for go sdk (https://github.com/dapr/go-sdk/pull/206/files). So since we'd like to support older Java versions which don't support UDS, for Java sdk, we should try HTTP or gRPC rather than directly follow the implementation for go sdk, right?

YEthYuan avatar Sep 16 '23 06:09 YEthYuan

I don't think we need to match the Go SDK implementation. IMO, the connection to the sidecar should happen transparently to the user based on the values of DAPR_HTTP_ENDPOINT and DAPR_GRPC_ENDPOINT env variables.

artursouza avatar Sep 18 '23 17:09 artursouza

thanks! good to know

YEthYuan avatar Sep 18 '23 21:09 YEthYuan