Re: [grpc-io] Sending a single huge message in one unary call vs sending chunks of messages with streaming

2020-05-21 Thread Josh Humphries
On Thu, May 21, 2020 at 11:06 PM wrote: > Thx Josh for the reply. > > let me clarify > > 1. I'm sending 100 MB+ string as bytes type with protobuf, so what the > server side is doing in the streaming case is, preallocates a size of 100 > MB+ (size info provided from the first streaming message)

Re: [grpc-io] Sending a single huge message in one unary call vs sending chunks of messages with streaming

2020-05-21 Thread kevinyaoxm
Thx Josh for the reply. let me clarify 1. I'm sending 100 MB+ string as bytes type with protobuf, so what the server side is doing in the streaming case is, preallocates a size of 100 MB+ (size info provided from the first streaming message) and keep appending the broken up bytes sent

Re: [grpc-io] Sending a single huge message in one unary call vs sending chunks of messages with streaming

2020-05-21 Thread kevinyaoxm
Thx John for the reply. let me clarify 1. I'm sending 100 MB+ string as bytes type with protobuf, so what the server side is doing in the streaming case is, preallocates a size of 100 MB+ (size info provided from the first streaming message) and keep appending the broken up bytes sent

Re: [grpc-io] Sending a single huge message in one unary call vs sending chunks of messages with streaming

2020-05-21 Thread Josh Humphries
Is the server doing anything? One reason why streaming typically would outperform unary is because you can begin processing as soon as you receive the first chunk. Whereas with a unary RPC, your handler cannot be called until the entire request has been received and unmarshalled. If this is a