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

create a new module(?) that allows to use the universal bootstrap easily #90

Open
weissi opened this issue May 5, 2020 · 6 comments
Open

Comments

@weissi
Copy link
Member

weissi commented May 5, 2020

I just had to create quite a long example on how to use the universal bootstrap over at apple/swift-nio-examples#48 . That is too long and unwieldy. NIO needs to do better.

We should create a new module(?) in this repo (swift-nio-extras) possibly called NIOUniversal or so which gets tools that are useful for using NIO universally across multiple networking platforms (BSD Sockets, Network.framework, and maybe soon IOCP).

@weissi
Copy link
Member Author

weissi commented May 5, 2020

The seed for this module could be EventLoopGroupManager (probably needs a better name): https://github.com/apple/swift-nio-examples/pull/48/files#diff-f7cf525c49713fc729e91d7720262e47R34

@weissi
Copy link
Member Author

weissi commented May 5, 2020

CC @tanner0101 / @adam-fowler / @artemredkin / @Yasumoto who are at least some of the folks who we had suffer through repeating this code.

Example: swift-server/async-http-client@5298f20#diff-8798af428c5cad17d0051540505e9d00R76

@weissi
Copy link
Member Author

weissi commented May 5, 2020

Please leave comments with stuff that you think this needs to support. The community wanted NIO anyway to provide a standard EventLoopGroup provider (#49) which could be solved with this issue too.

@adam-fowler
Copy link
Contributor

@weissi is there any point adding a TLS provider if useTLS is set to false? In the async-http-client example above in the situation where we are going through a proxy and TLS is to added later on in the pipeline I create the bootstrap as follows

bootstrap = NIOClientTCPBootstrap(tsBootstrap, tls: NIOInsecureNoTLS())

Don't know if it really makes any difference.

@dnadoba
Copy link
Member

dnadoba commented Feb 16, 2021

Any progress on this topic?EventLoopGroupManager looks actually really good! Maybe we can just move it into swift-nio-extras so we don't need to copy & past it.

@weissi
Copy link
Member Author

weissi commented Feb 16, 2021

@dnadoba I think we haven't resolved a really boring issue yet: Where can this live? I think it would depend on NIO, NIOSSL, and NIOTS at least but we can't really make this repo depend on them all :(.

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

No branches or pull requests

3 participants