mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #310] Making the ServerFuture an actual future #437
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#437
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 @vorner on GitHub (Dec 2, 2017).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/310
Currently, the ServerFuture creates its own
Core. This is a common anti-pattern in many crates that they insist on creating their own core, which means if I want to have multiple ServerFuture's, or a ServerFuture and hypers HTTP server in one process, each needs to have its own thread.The better way would be for the ServerFuture to actually be a future (maybe something like
Future<Item = (), Error = io::Error>. That way I could create the server, compose it within some larger future (shutdown & error handling, for example) and spawn it onto my own core.@bluejekyll commented on GitHub (Dec 4, 2017):
As an aside, the reason for this is baked into the history of the project. It was never clear to me that people might want to have the DNS Server be a library, but of course that was short sighted... It should be fairly easy to refactor the ServerFuture to move the
Coreout and possibly thecore.runinto the named binary itself to drive it.@DemiMarie commented on GitHub (Mar 19, 2018):
@bluejekyll I can think of several reasons; for instance, one might want to have a single process containing a DNS server, an SMB server, an LDAP server, and a Kerberos KDC, so that a single process can act as a complete Windows domain controller.
@bluejekyll commented on GitHub (Mar 19, 2018):
I can definitely see the value in doing this. I’ve planned on doing this work, but just haven’t gotten the time. I agree that it should be done.
@bluejekyll commented on GitHub (Mar 19, 2018):
And that’s a really neat idea.
@bluejekyll commented on GitHub (Apr 9, 2019):
I'm going to close this, as I think the ServerFuture and other supporting types like Catalog and Authority are in good shape for any Async work needed. We can reopen, or open another issue if changes are desired.