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

Revert "Removed GrpcClientBuilder#MultiClientBuilder (#1809)" #2127

Merged
merged 2 commits into from
Mar 8, 2022

Conversation

chemicL
Copy link
Contributor

@chemicL chemicL commented Mar 4, 2022

This reverts commit 74ac390.

Motivation:

GrpcClientBuilder#MultiClientBuilder was previously removed, but it
was the only practical way to share the underlying transport between
different service API clients exposed by the same backend. At the same
time, we don't want to expose ways to interact with the internal assembly
of the transport layer, as we attach default filters and don't want to
expose that internal implementation to users. Therefore, we're bringing
the MultiClientBuilder back.

Modifications:

  • Reverted GrpcClientBuilder#MultiClientBuilder,
  • Improved Javadoc,
  • Added MultiClientTest validating the behaviour.

Result:

GrpcClientBuilder#MultiClientBuilder can continue to be used by users
migrating from 0.41 release and its' intention is clarified.

@chemicL chemicL self-assigned this Mar 4, 2022
Copy link
Member

@idelpivnitskiy idelpivnitskiy left a comment

Choose a reason for hiding this comment

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

  1. Please describe in the commit message and PR description why we revert it.
  2. Consider adding a test that runs a single server with 2 different services, creates 2 clients with the same transport, sends one request to each service, verifies that only one connection is created. You can use TransportObserver to validate that.

Motivation:

`GrpcClientBuilder#MultiClientBuilder` was previously removed, but it
was the only practical way to share the underlying transport between
different service API clients exposed by the same backend. At the same
time, we don't want to expose ways to interact with the internal assembly
of the transport layer, as we attach default filters and don't want to
expose that internal implementation to users. Therefore, we're bringing
the `MultiClientBuilder` back.

Modifications:

- Reverted `GrpcClientBuilder#MultiClientBuilder`,
- Improved Javadoc,
- Added `MultiClientTest` validating the behaviour.

Result:

`GrpcClientBuilder#MultiClientBuilder` can continue to be used by users
migrating from 0.41 release and its' intention is clarified.
@chemicL chemicL force-pushed the restore-multi-client-builder branch from 84c17fb to 0406cb2 Compare March 8, 2022 13:45
@chemicL
Copy link
Contributor Author

chemicL commented Mar 8, 2022

Thanks @idelpivnitskiy for the suggestion regarding a test. I added one. Will merge this PR. We can follow up if you see any further improvements are needed.

@chemicL chemicL merged commit 1d84590 into apple:main Mar 8, 2022
@chemicL chemicL deleted the restore-multi-client-builder branch March 8, 2022 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants