Re: [grpc-io] Does every data frame contains exactly one grpc message?

2024-01-22 Thread 'Michael Lumish' via grpc.io
Yes, it is common in bidirectional streaming RPCs for the server to send messages before the client ends its side of the stream. For example, the server could respond to each message the client sends with a message, indefinitely, without the stream ever intentionally closing. On Mon, Jan 22, 2024

Re: [grpc-io] Does every data frame contains exactly one grpc message?

2024-01-22 Thread Harie Amjari
Ok got it. I was thinking that in a bidirecttional streaming RPC, the server can start sending out replies even before an END STREAM is received (from the DATA frame header). So it's like, (1) the server parses one grpc length prefixed message, (2) call user defined functions, (3) sends it

Re: [grpc-io] Does every data frame contains exactly one grpc message?

2024-01-22 Thread 'Michael Lumish' via grpc.io
No. In a stream, the contents of all of the DATA frames sent in one direction are collectively treated as a byte stream that contains length-delimited gRPC messages, independent of the DATA frame boundaries. In other words, any single DATA frame can contain only part of a message, or multiple

[grpc-io] Does every data frame contains exactly one grpc message?

2024-01-21 Thread Harie Amjari
Hi!, I read the grpc spec from the github but one thing isn't clear for me: > The repeated sequence of *Length-Prefixed-Message* items is delivered in DATA frames Does this mean that in a streaming gRPC, a data frame must contain exactly one grpc message? Is this enforced? -- You received