mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #464] Split ResolverFuture::new() into two returns (ResolverHandle, ResolverRuntime) #200
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#200
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bluejekyll on GitHub (May 14, 2018).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/464
Names TBD.
At the moment,
ResolverFuturereturns a lazily evaluated future ofSelf. This makes it complicated to use in multithreaded situations. The reason for this is that there are really two separate parts to the resolver, but one is hidden at the moment. The hidden part is the registration of the network connections, etc, in theNameServerPooland it's associatedNameServers.The proposed
ResolverHandle(name TBD) would have an API identical toResolverFuturetoday. It's responsibility would be identical to that of theResolverFuturetoday, which is to use the handles to theNameServersto make requests.The
ResolverRuntimeneeds to be run in the background. This can be on the same thread as theResolverHandlerequests or on a separate thread. It should be spawned, and shut itself down when there are no moreResolverHandle'soutstanding to it. To refactor the library to return this future, rather than spawning implicitly will take a bit of work, potentially all the way down into the proto library.This should improve the experience of constructing and then using the Resolver...
@hawkw commented on GitHub (May 23, 2018):
I have some thoughts on how to do this. I'd be happy to start a branch.
@bluejekyll commented on GitHub (May 23, 2018):
I’m open to other proposals as well... this was just my first take on what might be needed.
@hawkw commented on GitHub (May 23, 2018):
Well, I'm not going to make any promises until it's done, but I think I've worked out a way of making this change without touching anything outside of the resolver crate.
@hawkw commented on GitHub (May 23, 2018):
Okay, I have a working first pass on this in this branch.
In particular, you may want to check out this test I added, demonstrating that we can run the background task in a separate runtime on its' own thread from the futures returned by the
ResolverHandle.This branch probably still needs a little more polish before its' ready for prime-time. I think some of the code can be cleaned up, and it probably needs more documentation updates.
Signer/Verifier,KeyPair/PublicKey, etc. #389