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.

gRPC deframer complexity

See original GitHub issue

Is it only myself who finds ArmeriaMessageDeframer more complex than necessary? I think we can simplify it in the long term by writing a building block like the following:

Write a Reactive Streams Processor which decodes a stream of HttpObjects into another stream. It is different from FilteredStreamMessage in that it allows decoding M HttpObjects into N objects. This will provide some extension point like Netty’s ByteToMessageDecoder does.

On top of this building block, we could rewrite ArmeriaDeframer with much less state management.

It may be possible to do something similar for ArmeriaMessageFramer, but I didn’t think much about it yet.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
trustincommented, Aug 6, 2020

We also need to try to reuse the HttpData in an input stream when producing an output stream to reduce unnecessary memory copies. For example, we could forward the input HttpData instance as it is when it is a partial content without any other stuff like boundaries and length headers. Could use WITH_POOLED_OBJECTS when necessary as well.

1reaction
jrhee17commented, Aug 5, 2020

I know you’re already working on multipart stuff, so I’ll look for another issue. I’ll try to pop in for reviews instead 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Performance Best Practices - gRPC
A user guide of both general and language-specific best practices to improve performance.
Read more >
Built-in support of grpc-web clients · Issue #4823 - GitHub
The big thing I see as a problem is making this secure by default. This means handling CORS and XSRF tokens, which I...
Read more >
Index (grpc-all 1.21.0 API) - javadoc.io
Interface for deframing gRPC messages. deframerClosed(boolean) - Method in class io.grpc.internal.AbstractClientStream.TransportState · deframerClosed(boolean) ...
Read more >
Comparing gRPC performance across different technologies
There exist several gRPC benchmarks including an official one, ... library but the performance of this complex operation in each technology.
Read more >
gRPC vs. REST: Performance Simplified | by Bimesh De Silva
However, upon closer inspection of the code, you could see that much of the added complexity to the REST request comes from serializing...
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