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

Stabilize UseCompressor and SetSendCompressor #7003

Open
sondrehd opened this issue Feb 27, 2024 · 1 comment
Open

Stabilize UseCompressor and SetSendCompressor #7003

sondrehd opened this issue Feb 27, 2024 · 1 comment
Labels
P2 Type: Feature New features or improvements in behavior

Comments

@sondrehd
Copy link

Hello,

The example code for specifying compression method references the grpc.UseCompressor method.

While reading it's source code I noticed the comments say it's experimental (and it's been experimental for at least 4 years according to the git blame). I was wondering if that is correct? The alternative would, as far as I know, be to use the dialoption WithCompressor, but the docs say that it's deprecated in favor of the aforementioned experimental UseCompressor.

Is it safe to use, or is there some alternative I've missed?
Thanks!

@dfawley
Copy link
Member

dfawley commented Feb 27, 2024

Anything documented as "deprecated" but that doesn't also state that it may/will be removed in the future, will be supported throughout 1.x releases, so WithCompressor can be used without worrying that it will be broken. (Newer deprecation notices explicitly state something like "Will be supported throughout 1.x.") "Deprecated" in this sense means "there are better ways of doing the same thing", either performance-wise or ergonomically or both.

For reference, our full versioning policy is here: https://github.com/grpc/grpc-go/blob/master/Documentation/versioning.md

Because the UseCompressor feature is still marked as experimental, there may be future changes we want to make to the API, so it would be better to avoid it if you aren't willing to update your code if we do make changes there.

In order to stabilize UseCompressor, we would really like to receive feedback from our users that the API works well for them. We haven't had any complaints, but we don't really know who is using this feature, either. We are considering some changes to the encoding package (that contains the compressor and codec interfaces), but that would affect the implementers of codecs/compressors, not uses of them. So it may be the case that we could stabilize UseCompressor and SetSendCompressor without needing to stabilize the encoding package.

@dfawley dfawley changed the title UseCompressor still experimental? Stabilize UseCompressor Feb 27, 2024
@dfawley dfawley added Type: Feature New features or improvements in behavior P2 and removed Type: Question labels Feb 27, 2024
@dfawley dfawley changed the title Stabilize UseCompressor Stabilize UseCompressor and SetSendCompressor Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Type: Feature New features or improvements in behavior
Projects
None yet
Development

No branches or pull requests

2 participants