[grpc-io] Re: C++: AsyncWrite constraint on completion queue

2023-09-01 Thread Pedro Alfonso
Hi Yash, Recently we have being trying both approaches (async and callbacks), since we are streaming chunks of a file to the Swift clients (our server is C++). Our observations are: 1.- The bytes received on the client when using callbacks are between 25-40 Mb/s. 2.- The bytes received on the cl

[grpc-io] Re: C++: AsyncWrite constraint on completion queue

2023-05-31 Thread 'yas...@google.com' via grpc.io
You would find some examples here - https://github.com/grpc/grpc/tree/master/examples/cpp The documentation would be best found in the headers - https://github.com/grpc/grpc/blob/master/include/grpcpp/support/client_callback.h https://github.com/grpc/grpc/blob/master/include/grpcpp/support/serve

[grpc-io] Re: C++: AsyncWrite constraint on completion queue

2023-05-18 Thread Ashutosh Maheshwari
Hello Yash, Can you please point me to the documentation of the Callback API? Regards Ashutosh On Wednesday, May 17, 2023 at 6:54:25 AM UTC+5:30 yas...@google.com wrote: I'll preface this by saying - Use the C++ callback API. Instead of trying to understand the Async CQ-based API, the callback

[grpc-io] Re: C++: AsyncWrite constraint on completion queue

2023-05-16 Thread 'yas...@google.com' via grpc.io
I'll preface this by saying - Use the C++ callback API. Instead of trying to understand the Async CQ-based API, the callback API should be the choice and is our current recommendation. > Only one write is permissible per stream. So we cannot write another tag on a stream until we receive a res

[grpc-io] Re: C++: AsyncWrite constraint on completion queue

2023-05-10 Thread Ashutosh Maheshwari
Hello, My question is, if a write tag for a previous write does not surface on the completion queue, shall we wait for it indefinitely? What should be the strategy to handle this scenario? Regards Ashutosh On Wednesday, April 26, 2023 at 11:11:57 PM UTC+5:30 apo...@google.com wrote: > First,

[grpc-io] Re: C++: AsyncWrite constraint on completion queue

2023-05-09 Thread Ashutosh Maheshwari
Hello, Due to multiple threads writing into the completion queue in parallel, we have an internal queue in which we insert the message as soon as we receive a tag from the completion queue. So, all such insertions eventually become part of the internal queue. While inserting a new record in t

[grpc-io] Re: C++: AsyncWrite constraint on completion queue

2023-04-26 Thread 'apo...@google.com' via grpc.io
First, it's important to clarify what it means to wait for a "Write" tag to complete on a completion queue: When async "Write" is initially attempted, the message can be fully or partially buffered within gRPC. The corresponding tag will surface on the completion queue that the Write is associa