Can you make a shared object between the two observers to control flow between the two? That way they don't need a ref to each other?
On Wednesday, October 5, 2016 at 1:07:17 PM UTC-7, [email protected] wrote: > > I am playing around with the experimental flow control functionality in > ServerCallStreamObserver. > My goal is to wire up bi-directional calls into RxJava pipelines. For the > most part gRPC and Rx wire together easily. If you are interested, my very > initial setup is here: > https://gist.github.com/oillio/75ffadfd44c30497a4e8cf6476eff438 > > I've got a couple questions on how flow control works. > > From what I can see, the request-side flow control is actually managed > through the passed in responseObserver object. > In order to take control, I should do something along the lines of: > ((CallStreamObserver) responseObserver).disableAutoInboundFlowControl(); > > Then, I can request additional messages through: > ((CallStreamObserver) responseObserver).request(1); > > Is this the recommended way to do this? > Is there a way, or plans to provide a way, to manage flow control through > the request StreamObserver returned by the application code handler? > This is a bit awkward for my use case as my request StreamObserver will > need to keep a reference to the response StreamObserver in order to manage > the request-side 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 [email protected]. To post to this group, send email to [email protected]. 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/57e28dbe-4cd5-4647-a2e6-e71fc00822e3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
