On Wed, Mar 13, 2024 at 1:11 PM Abhijeet Tiwari <abhijeet1...@gmail.com>
wrote:

> 1) let's say a java based client that has opened a server streaming rpc
> 2) after this, we are to receive some info through a webhook on our
> server, but it might take some time
> 3) we have to send this info received over webhook to the java based
> client over the server streaming rpc
>

You keep mentioning the Java client. What language is your server?

4) my question is, is there a way i can store the info of that stream and
> then invoke stream.Send() when i receive the info over webhook
>
5) also, there might be 3 different servers(with a load balancer), so the
> rpc could be opened over 1st, but the webhook hit would have occured on
> 3rd, so even if i store this stream object on a global, let's say redis
> cache, will I be able to establish a connection to the client from the 3rd
> server?
>

The stream is not a data object. It can't be serialized and stored in a DB.
It is only useful on the server that has the object. You can't establish a
new connection to the client; you can only use the existing one.

Instead of storing the stream in Redis, you could generate a unique key and
store the stream in a map on the server that received the stream. Then
store (server id, stream key) in Redis. When the webhook fires, forward the
information to the appropriate server and have that server send back to the
client.

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CA%2B4M1oOhETx8swxab3wqDqFVUi9_mdOttin%2BNMhsJVLO8xPn0w%40mail.gmail.com.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to