-
Notifications
You must be signed in to change notification settings - Fork 182
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
Examples for HTTP and gRPC compression #1342
Conversation
Hmmm, I had intended to propose these as separate PRs. Oh well, they are fine together. Both HTTP and gRPC examples are now included in the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @bondolo!
Can you please update PR title and description to account for gRPC examples as well?
...ression/src/main/java/io/servicetalk/examples/grpc/compression/CompressionExampleClient.java
Outdated
Show resolved
Hide resolved
...ression/src/main/java/io/servicetalk/examples/grpc/compression/CompressionExampleClient.java
Show resolved
Hide resolved
...ression/src/main/java/io/servicetalk/examples/grpc/compression/CompressionExampleServer.java
Outdated
Show resolved
Hide resolved
...ression/src/main/java/io/servicetalk/examples/grpc/compression/CompressionExampleServer.java
Outdated
Show resolved
Hide resolved
...es/grpc/compression/src/main/java/io/servicetalk/examples/grpc/compression/package-info.java
Outdated
Show resolved
Hide resolved
...n/src/main/java/io/servicetalk/examples/http/compression/CompressionFilterExampleServer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work @bondolo, I left some comments. I would consider also printing out the response header of the server, to demonstrate compression selection.
...ression/src/main/java/io/servicetalk/examples/grpc/compression/CompressionExampleClient.java
Outdated
Show resolved
Hide resolved
...ression/src/main/java/io/servicetalk/examples/grpc/compression/CompressionExampleServer.java
Outdated
Show resolved
Hide resolved
servicetalk-examples/grpc/compression/src/main/resources/log4j2.xml
Outdated
Show resolved
Hide resolved
Motivation: Provide an example demonstrating use of the content encoding compression features. Modifications: - A new HTTP example, Compression - Additional documentation Result: No further need to reference test code to understand how to use compression features.
9408dc3
to
8b3962b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Hope it will help users to start with using compression in ST 🎉
LGTM after the unused constant is removed:
...ression/src/main/java/io/servicetalk/examples/grpc/compression/CompressionExampleServer.java
Outdated
Show resolved
Hide resolved
Motivation: Provide an example demonstrating use of the content encoding compression features. Modifications: - A new gRPC example, Compression - Additional documentation Result: No further need to reference test code to understand how to use compression features.
Motivation:
Provide an example demonstrating use of the content encoding compression features.
Modifications:
Result:
No further need to reference test code to understand how to use compression features.