-
Notifications
You must be signed in to change notification settings - Fork 15
Add a transport for wrapping a NIO Channel #101
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Motivation: The NIO based client and transports want to fully manage the underlying NIO channels for you; creating them and tearing them down as necessary. However, in some instances users already have a NIO channel which they may also want to use a client. This might happen if they want to run gRPC within another protocol, for example. Modifications: - Add a "wrapped channel" client transport which takes ownership of a NIO channel and configures the channels pipeline to do gRPC. - This is a different transport because a number of features aren't available such as reconnects and client-side load-balancing. Result: Users can wrap an existing NIO channel into a custom transport.
gjcairo
approved these changes
May 20, 2025
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.
LGTM, just two nits.
Sources/GRPCNIOTransportCore/Client/WrappedChannel/WrappedChannel.swift
Outdated
Show resolved
Hide resolved
Sources/GRPCNIOTransportCore/Client/WrappedChannel/WrappedChannel.swift
Outdated
Show resolved
Hide resolved
Co-authored-by: Gus Cairo <me@gustavocairo.com>
dongjoon-hyun
added a commit
to apache/spark-connect-swift
that referenced
this pull request
May 30, 2025
### What changes were proposed in this pull request? This PR aims to upgrade `gRPC Swift NIO Transport` to 1.2.2 from 1.1.0. ### Why are the changes needed? This brings the following improvements and bug fixes. Previously, 1.2.0 and 1.2.1 causes a crash in GitHub Action CI. - https://github.com/grpc/grpc-swift-nio-transport/releases/tag/1.2.2 - grpc/grpc-swift-nio-transport#110 - https://github.com/grpc/grpc-swift-nio-transport/releases/tag/1.2.1 - https://github.com/grpc/grpc-swift-nio-transport/releases/tag/1.2.0 - grpc/grpc-swift-nio-transport#101 - grpc/grpc-swift-nio-transport#103 - grpc/grpc-swift-nio-transport#104 ### Does this PR introduce _any_ user-facing change? No behavior change. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #185 from dongjoon-hyun/SPARK-52359. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation:
The NIO based client and transports want to fully manage the underlying NIO channels for you; creating them and tearing them down as necessary. However, in some instances users already have a NIO channel which they may also want to use a client. This might happen if they want to run gRPC within another protocol, for example.
Modifications:
Result:
Users can wrap an existing NIO channel into a custom transport.