by reidbuzby · 3y ago · 0 comments
It's called KonigKontext, check it out here: https://github.com/konigsoftware/konig-kontext!
Example use cases include:
Propagating security principals, or user credentials and identifiers throughout an entire request lifetime across all of your microservices. Propogating distributed tracing information. Set a request trace id upon receiving a request and later access that id in any downstream microservice. However, Konig Kontext is built to support any type of context value, so it can be extended to fit any specific use cases as well.
Let me know what you think!
It allows for the opaque propagation of side channel information, where intermediates don't need to know what's there.
side-channel-with-well-defined-propagation-rules is pretty useful.
Maybe my reaction is a question of purity. I don't really see why one would think a request body should be in the schema but we should leave other data out of the schema. Wouldn't every single argument point to consistency?
I like gRPC and what it gives you. I personally would like that same explicit schema and type safety to apply to my tracing as well. Its interesting to me that others would draw a line.
This applies especially to grpc, where everything is optional.
To be clear, I prefer explicit over implicit. But that doesn't always scale well to large orgs.
So, I’d argue the OP is using gRPC correctly, and I’d be using it wrong if I hadn’t given up on it long ago. I appreciate things like static type checking, and services that err on the side of rejecting unparsable requests in order to avoid data corruption. Protobufs/gRPC require heroic effort on the part of the RPC handler implementation if you want those things. In particular, it is easier to implement your own serialization format than typecheck the results returned by the APIs protoc emits.
It’s one of those things you eventually wish you had.
[1] https://github.com/konigsoftware/konig-kontext/blob/84faa627...