-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate GRPC context propagation #159
Comments
@FroMage Thanks for finding that. It does seem to have a lot of similarities, as well as some additional capabilities like the timeout on the validity of context. At least for the common parts, it should hopefully be possible to create a ThreadContextProvider for GRPC that would, as you mention, allow the user to deal with a single common API. |
I can see one obstacle to plugging in gRPC context, which is that there does not appear to be any way to establish a default/empty context on a thread. At first glance I thought Context.ROOT might have been helpful here, however, it clearly states that it is not be used as the context for new threads. To move ahead with this, I think we either need gRPC to supply a ThreadContextProvider impl itself or to at least expose the necessary API by which a cleared/empty context can be obtained. Given that, should we consider this issue as a possible enhancement for vNext ? |
It appears GRPC has support for manual context propagation, by providing a storage mechanism. It's not entirely clear to me if it's pluggable or not, but it looks similar in use-case to what we do here. We should check it out and see if we can implement GRPC context propagation with MP-CP (to allow MP-CP users to not have to deal with two CP APIs at the same time to get both GRPC and other contexts), and possibly get in touch with them to talk about it.
The text was updated successfully, but these errors were encountered: