Known issues for grpc-java-to-Armeria migration
See original GitHub issueFrom Andrew O’Malley in our Slack workspace:
The biggest issue I have is that you can’t transparently swap a vanilla grpc solution for an Armeria solution due to incompatibilities around
Metadata
andContext
.The
Metadata
issue pops up fairly early in that the standard mechanism of sending back status messages with payloads requires it. I know a bug has been fixed in this space, and work is in progress, so that’s great.There’s also some things that decorators can’t appear to do (e.g. exception handling), so it means having a mixture of vanilla grpc interceptors combined with decorators which makes reasoning a bit more complicated than a single chain
(I actually prefer Armeria’s decorators as they can apply other non-grpc services and therefore are more general). However, having to write Armeria specific integrations makes it harder to switch grpc implementations should there be a blocker down the road.
Context
- I’m not sure if this is possible but maybe we could build some bridge between Context
and RequestContext
? We might need to make some modifications in RequestContext
.
Decorators vs. Interceptors - I’m not sure we can make Armeria decorators capable of all what gRPC interceptors can do, but it may be worth exploring.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top GitHub Comments
Thanks for this example @andrewoma! I tried writing a unit test that populates the context in an interceptor and reads it later in the method and it worked fine (I noticed there didn’t seem to be anything obviously incompatible about the gRPC context implementation that would prevent it from working).
Perhaps the main issue was about the
Metadata
- I think @trustin might be about to cut a release that supports it 😃 If you can try out the next release and post any error message you have with a usage ofMetadata
orContext
you have, will look into it.@andrewoma Can you look at my above comment and #1828? I found that creating a test case based on your example seemed to work fine so if you can point out what doesn’t currently work, we can work on that.