grpc-java icon indicating copy to clipboard operation
grpc-java copied to clipboard

Clarify the Javadoc for CallStreamObserver

Open leventov opened this issue 6 years ago • 4 comments

The relevant part of the current Javadoc: https://github.com/grpc/grpc-java/blob/6b04fc18f30deb3519c389fe457b99cf5a8d99d0/stub/src/main/java/io/grpc/stub/CallStreamObserver.java#L25-L35

As far as I can tell, for any call, there are three implementations of StreamObserver involved:

  1. Implemented by the application, on the RPC client side ('inbound')
  2. Implemented by the framework, on the RPC client side ('outbound'), ClientCallStreamObserver
  3. Implemented by the framework, on the RPC server side ('outbound'), ServerCallStreamObserver

I think it would be nice to clarify that. I've spent significant time trying to understand where does ClientCallStreamObserver appear, being confused by the premise that there are only two implementations of StreamObserver.

leventov avatar Dec 19 '19 10:12 leventov

Sometime, look at examples will help understand the APIs. I do agree with you some of our javadocs can be improved, and we are welcoming any contribution that helps our project. If you can send a pr to make the documentations better, we will be glad to review and merge it.

ran-su avatar Dec 19 '19 18:12 ran-su

reopen this bug. Couple more clarifications are necessary as @leventov pointed out in the https://github.com/grpc/grpc-java/pull/6561. @leventov, do you want to fix the other two?

creamsoup avatar Jan 30 '20 22:01 creamsoup

No

leventov avatar Jan 31 '20 14:01 leventov

Need to go through the PR pointed by @creamsoup for more clarification but the PR link is invalid as its redirecting to the same page. @leventov

kumarakshays avatar Jan 21 '25 06:01 kumarakshays