Reputation: 29
Taking the server streaming gRPC API as an example. I’d like to understand if the StreamObserver that the client generates and sends as part of the initial request to the server actually gets sent over the wire for the server to then invoke directly. Or if what is actually happening is the client registers the observer and then gets notified to call onNext (or other) itself. Looking to understand this process a bit deeper than docs explain.
Upvotes: 1
Views: 1315
Reputation: 26394
StreamObserver
is not sent over-the-wire; it is just used locally. The gRPC wire protocol sends metadata and messages between the client and server and the StreamObserver API locally converts events into callbacks.
You may also be interested in the gRPC wire protocol.
Upvotes: 3