0
votes

I am implementing a grpc server in nodejs . grpc is great. I want to know is it possible to send a message from grpc server to the client(not request/response)?

I know we have bidirectional communication in grpc with full-duplex. which means this is similar functionality we have in socket.io(websocket). how we can push messages to a single client? is it possible to track down grpc clients? or even better, get a heartbeat?

1

1 Answers

0
votes

gRPC servers cannot initiate connections to clients. Your best bet is to initiate bidirectional streaming from the client, as you said. If your client applications also ran gRPC servers, the application server could initiate connections to them, but that may be a heavy-handed solution.