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

[C#] Support creating FlightClient with Grpc.Core.Channel #39335

Closed
johnnyg opened this issue Dec 21, 2023 · 0 comments · Fixed by #39348
Closed

[C#] Support creating FlightClient with Grpc.Core.Channel #39335

johnnyg opened this issue Dec 21, 2023 · 0 comments · Fixed by #39348

Comments

@johnnyg
Copy link
Contributor

johnnyg commented Dec 21, 2023

Describe the enhancement requested

Context

We have a large C# repo which targets .NET framework 48 and would like to use Arrow Flight.

Problem

Right now in order to create a FlightClient in C# you need to create and pass it an instance of Grpc.Net.Client.GrpcChannel which internally requires a HTTP client that supports HTTP/2.

Unfortunately on .NET framework 48 the HTTP client only supports HTTP/1.0 and HTTP/1.1.
The suggested solution is instead to use Grpc.Core.Channel however we can't instantiate a FlightClient with this type of channel.

Proposal

We could support creating FlightClient with Grpc.Core.Channel as well as the existing Grpc.Net.Client.GrpcChannel.
Update: this is actually trivial to do as they both inherit from Grpc.Core.ChannelBase

Component(s)

C#

CurtHagenlocher pushed a commit that referenced this issue Dec 22, 2023
…39348)

as well as Grpc.Net.Client.GrpcChannel by changing our constructor arg to Grpc.Core.ChannelBase which both classes inherit from.

### Rationale for this change

### What changes are included in this PR?

Changing the constructor of C#'s Flight Client to take in a ChannelBase which allows for multiple implementations of gRPC channels to be passed in.

### Are these changes tested?

Existing tests already cover the use but have also manually tested in a separate app (

### Are there any user-facing changes?

No as we're just changing the constructor to take in a parent/base class instead.
* Closes: #39335

Authored-by: John Garland <johnnybg@gmail.com>
Signed-off-by: Curt Hagenlocher <curt@hagenlocher.org>
@CurtHagenlocher CurtHagenlocher added this to the 15.0.0 milestone Dec 22, 2023
clayburn pushed a commit to clayburn/arrow that referenced this issue Jan 23, 2024
…nnel (apache#39348)

as well as Grpc.Net.Client.GrpcChannel by changing our constructor arg to Grpc.Core.ChannelBase which both classes inherit from.

### Rationale for this change

### What changes are included in this PR?

Changing the constructor of C#'s Flight Client to take in a ChannelBase which allows for multiple implementations of gRPC channels to be passed in.

### Are these changes tested?

Existing tests already cover the use but have also manually tested in a separate app (

### Are there any user-facing changes?

No as we're just changing the constructor to take in a parent/base class instead.
* Closes: apache#39335

Authored-by: John Garland <johnnybg@gmail.com>
Signed-off-by: Curt Hagenlocher <curt@hagenlocher.org>
dgreiss pushed a commit to dgreiss/arrow that referenced this issue Feb 19, 2024
…nnel (apache#39348)

as well as Grpc.Net.Client.GrpcChannel by changing our constructor arg to Grpc.Core.ChannelBase which both classes inherit from.

### Rationale for this change

### What changes are included in this PR?

Changing the constructor of C#'s Flight Client to take in a ChannelBase which allows for multiple implementations of gRPC channels to be passed in.

### Are these changes tested?

Existing tests already cover the use but have also manually tested in a separate app (

### Are there any user-facing changes?

No as we're just changing the constructor to take in a parent/base class instead.
* Closes: apache#39335

Authored-by: John Garland <johnnybg@gmail.com>
Signed-off-by: Curt Hagenlocher <curt@hagenlocher.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants