grpc-node icon indicating copy to clipboard operation
grpc-node copied to clipboard

VSock support or examples of custom channels

Open payton opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

I am interested in using @grpc/grpc-js for communication between an AWS Nitro Enclave and its host. There is a lightweight package for interfacing with VSock from node called https://github.com/wei-rong-1/node-vsock

Describe the solution you'd like

I would either like vsock support or an example of creating a custom Channel that could wrap the above referenced library.

Describe alternatives you've considered

The alternative to native support is creating a custom Channel that wrapps the node-vsock library.

payton avatar Dec 05 '24 16:12 payton

I think it is unlikely that we will prioritize implementing built-in Vsock support in the foreseeable future. However, an implementation of Vsock support was contributed to the C++ gRPC implementation last year in https://github.com/grpc/grpc/pull/33309, and the naming.md doc now has an official entry for the vsock target name scheme, so I would also be willing to accept a contribution of a conformant implementation in Node. However, the node-vsock library you referenced has a compiled Node extension, which I strongly want to avoid integrating into grpc-js, so a different vsock implementation would be needed to add it that way.

In addition, there is currently no way to create a custom channel that uses a node-vsock socket, but other gRPC implementations do have functionality that would allow that, so adding some functionality like that in this library is a reasonable possibility.

murgatroid99 avatar Dec 09 '24 21:12 murgatroid99