Closed aleksander-vedvik closed 8 months ago
I agree that the rpcCtx should be independent of the streamCtx. The rpcCtx should be passed along with each message over the NodeStream. The streamCtx should not be exposed to the client developer at all. That said, if there is a benefit of using the streamCtx when closing a connection (e.g., for clean shutdown), that should be fine. But the client should not have the option to cancel or set a timeout on the NodeStream's streamCtx via an RPC/Quorum call.
@johningve I don't recall if we discussed the above previously, but please let us know if you have some additional context related to this that could be useful for us to know about. Thanks!
There is a workaround for the context object due to how a stream is used as the underlying communication. This workaround makes the stream context coupled with individual gRPC contexts.
To make it easier to follow, we will make a distinction between the two contexts:
The current implementation is as follows:
To be discussed: