question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Known issues for grpc-java-to-Armeria migration

See original GitHub issue

From 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 and Context.

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:open
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
anuraagacommented, Jun 11, 2019

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 of Metadata or Context you have, will look into it.

0reactions
anuraagacommented, Jun 29, 2019

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Armeria gRPC performance analysis · Issue #799 - GitHub
Stream message processing ( ConcurrentLinkedQueue ) - possibly due to poor JIT or poor caching. As most messages will just have a few...
Read more >
Armeria – Your go-to microservice framework
Logging request bodies, performing retries or circuit breaking are all built-in. The friendly devs rapidly respond to issues and feature requests. Armeria is ......
Read more >
Let's Play with Reactive Streams on Armeria – Part 2
In cases like this, you can build a stream server that returns large amounts of user information on gRPC by following the instructions...
Read more >
gRPC ServerInterceptor with Armeria - Stack Overflow
I am having some trouble finding documentation for how to interact with the context object correctly. Can someone help point me in the...
Read more >
Armeria: The Only Thrift/gRPC/REST Microservice Framework ...
Armeria is a Netty-based open-source Java microservice framework which ... How to use Armeria's universal decorator API to apply common ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found