Since Go's API is synchronous/blocking, I am pretty sure that sender always
block until message is actually sent, which will respect HTTP/2 flow
control windows.

If you want an async API, where a sender can queue up messages even before
the receiver can accept them, you could push them into a buffered channel
and have another goroutine that is de-queueing from the channel and writing
to the receiver as allowed by flow control.

Java is different because its API is completely async and non-blocking. So
backpressure requires more sophistication in the app code.

----
*Josh Humphries*
jh...@bluegosling.com

On Wed, Oct 25, 2017 at 8:21 AM, <elda...@gmail.com> wrote:

>
> Hi,
>
> Is it possible to perform manual flow control in the RPC call level in
> grpc-go?
>
> I'm looking for something like the flow control mechanism of the grpc
> library for java:
> https://github.com/grpc/grpc-java/tree/master/examples/src/
> main/java/io/grpc/examples/manualflowcontrol
>
> I would like my clients/servers to have the option to specify for the
> other side whatever they are ready to receive new messages or not.
>
> I looked for this functionality in grpc-go documentation and the source
> code but only found option to tune the window size of the http2 transport
> layer.
> Is this functionality implemented in grpc-go?
>
> Best,
> Eldad.
>
> --
> You received this message because you are subscribed to the Google Groups "
> grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to grpc-io+unsubscr...@googlegroups.com.
> To post to this group, send email to grpc-io@googlegroups.com.
> Visit this group at https://groups.google.com/group/grpc-io.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/grpc-io/c2b0653a-3ba5-4fd6-9164-dd1432c2af16%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/c2b0653a-3ba5-4fd6-9164-dd1432c2af16%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CAO78j%2B%2BJPgEbd7a3OT3AiV3emasJQ0sKWpVcBny7GV89J-bCtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to