Skip to content
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

Support compression on the server #714

Merged
merged 1 commit into from
Feb 10, 2020
Merged

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Jan 30, 2020

Motivation:

We have compression on the client; we should support it on the server as
well!

Modifications:

  • Add server configuration to determine a preferred compression used for
    responses, and a list of compression algorithms enabled for requests.
  • Add options to disable compression for responses on the RPC context
  • Add an option to disable compression for a single response on the
    sendResponse method on the RPC context
  • Add interop tests.
  • Add a handful of other tests.

Result:

Server supports compression

@glbrntt glbrntt requested a review from MrMage January 30, 2020 14:46
Copy link
Collaborator

@MrMage MrMage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good already!

Sources/GRPC/Compression/MessageEncoding.swift Outdated Show resolved Hide resolved
Sources/GRPC/HTTP1ToRawGRPCServerCodec.swift Outdated Show resolved Hide resolved
Sources/GRPC/Compression/MessageEncoding.swift Outdated Show resolved Hide resolved
Sources/GRPC/HTTP1ToRawGRPCServerCodec.swift Outdated Show resolved Hide resolved
Sources/GRPC/HTTP1ToRawGRPCServerCodec.swift Outdated Show resolved Hide resolved
Sources/GRPC/Server.swift Outdated Show resolved Hide resolved
@glbrntt glbrntt force-pushed the gb-compression-server branch 2 times, most recently from 542bc78 to 3290171 Compare February 7, 2020 13:33
Motivation:

We have compression on the client; we should support it on the server as
well!

Modifications:

- Add server configuration to determine a preferred compression used for
  responses, and a list of compression algorithms enabled for requests.
- Add options to disable compression for responses on the RPC context
- Add an option to disable compression for a single response on the
  `sendResponse` method on the RPC context
- Add interop tests.
- Add a handful of other tests.

Result:

Server supports compression
@glbrntt glbrntt force-pushed the gb-compression-server branch from 3290171 to d943935 Compare February 7, 2020 13:40
@glbrntt glbrntt added nio ⚠️ semver/major Breaks existing public API. labels Feb 7, 2020
@glbrntt glbrntt merged commit e3ab183 into grpc:nio Feb 10, 2020
@glbrntt glbrntt deleted the gb-compression-server branch August 5, 2020 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️ semver/major Breaks existing public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants