[grpc-io] Re: Send same message to multiple clients

2022-02-02 Thread 'zda...@google.com' via grpc.io
Yes, all protobuf v3 messages and immutable in Java so it's thread-safe to be used concurrently. (Note that you should not send concurrent messages over the same stream, because that will corrupt the data that grpc is sending out.) On Sunday, January 30, 2022 at 7:43:36 AM UTC-8 chris...@gmail.

[grpc-io] Re: Send same message to multiple clients

2022-02-04 Thread Hristo Katsarski
Hi, Thank you for your reply. It is very useful, will save CPU and GC times. For sending, I already synchronize calling "onNext()" on the outbound stream observer, since sending may happen directly if isReady() is true(by the caller thread) or via the setOnReadyHandler() Runnable, i.e. some t

[grpc-io] Re: Send same message to multiple clients

2023-01-18 Thread 黄滨
In async stream programming, when the same message is sent to multiple clients with ServerAsyncWriter::Write(), does it serialize the message for each client? Could we serialize the message only once? 在2022年2月5日星期六 UTC+8 01:42:55 写道: > Hi, > > Thank you for your reply. It is very useful, will s