servicecomb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: StreamObserver are thread-unsafe
Date Mon, 15 Oct 2018 05:46:37 GMT
I think this is the common practices of Stream. The message should be
send one by one.
>From my experience if we can handle the message as quickly as
possible, it would cause the performance issue here.

I think we should do some PoC to find out if the performance bottom
nake of GRPC first.

Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Mon, Oct 15, 2018 at 11:04 AM fu chengeng <oliugian@hotmail.com> wrote:
>
>
> The way grpc callbacks (StreamObserver) are thread-unsafe, the callbacks for the same
service can only be one after the other, which can become a performance bottleneck
>
> https://grpc.io/grpc-java/javadoc/io/grpc/stub/StreamObserver.html
> StreamObserver (grpc-all 1.15.1 API)<https://grpc.io/grpc-java/javadoc/io/grpc/stub/StreamObserver.html>
> Receives a value from the stream. Can be called many times but is never called after
onError(Throwable) or onCompleted() are called.. Unary calls must invoke onNext at most once.
Clients may invoke onNext at most once for server streaming calls, but may receive many onNext
callbacks.
> grpc.io
>
>
>

Mime
View raw message