I'm working with the grpc-java manual flow control API to implement backpressure. It's rather strange and I was hoping to learn more about why it is implemented the way it is.
I have a service where a client sends a stream of numbers to a server, which returns an Empty when the stream ends. On both the client and server, the StreamObserver that handles response messages configures request backpressure. Here is an example: https://gist.github.com/rmichela/470880b2d67858700dad7dc244a81ad8 - On line 65, the responseObserver disables inbound flow control on the request stream, and then requests one message. - On line 25, the responseObserver sets an onReadyHandler to send another request message in the request stream each time a message is requested from the server. This API seems backwards. Why is the response observer responsible for managing the request observer's flow control? -- 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/eacd7f9d-c5a4-49a6-b72e-56b14b32abaa%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.