[GH-ISSUE #308] Is trust_dns_server sync or async? #140

Closed
opened 2026-03-07 22:25:55 +03:00 by kerem · 4 comments
Owner

Originally created by @vi on GitHub (Dec 1, 2017).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/308

One one hand I see refences to Tokio and things.

On the other, trust_dns_server::server::RequestHandler's fn handle_request(&self, request: &Request) -> Message returns plain Message instead of Future<Message>, so expected to be instantaneous. How then should one implement proxies or replicated servers or something like that? Or does it happen in some thread pool?

In any case the documentation should be extended.

Originally created by @vi on GitHub (Dec 1, 2017). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/308 One one hand I see refences to Tokio and things. On the other, `trust_dns_server::server::RequestHandler`'s `fn handle_request(&self, request: &Request) -> Message` returns plain `Message` instead of `Future<Message>`, so expected to be instantaneous. How then should one implement proxies or replicated servers or something like that? Or does it happen in some thread pool? In any case the documentation should be extended.
kerem 2026-03-07 22:25:55 +03:00
  • closed this issue
  • added the
    duplicate
    label
Author
Owner

@bluejekyll commented on GitHub (Dec 1, 2017):

The server hasn't gotten a lot of treatment to be used internally, or be exposed to be used inside other software at the moment. I do see the value in this, but it's not be high priority at the moment. You're correct that a lot of the library keeps internal references to the reactor::Core and and other async components.

I'd be happy to start making the server easier to use inside other libraries, so if you have changes you'd like to see to make that easier, let's definitely file issues for that use case.


btw, to answer the question directly, the Server is async, it's just not easily embeddable in other software at the moment.

<!-- gh-comment-id:348639756 --> @bluejekyll commented on GitHub (Dec 1, 2017): The server hasn't gotten a lot of treatment to be used internally, or be exposed to be used inside other software at the moment. I do see the value in this, but it's not be high priority at the moment. You're correct that a lot of the library keeps internal references to the reactor::Core and and other async components. I'd be happy to start making the server easier to use inside other libraries, so if you have changes you'd like to see to make that easier, let's definitely file issues for that use case. ---- btw, to answer the question directly, the Server is async, it's just not easily embeddable in other software at the moment.
Author
Owner

@bluejekyll commented on GitHub (Dec 15, 2017):

This is a duplicate of #309

<!-- gh-comment-id:352136870 --> @bluejekyll commented on GitHub (Dec 15, 2017): This is a duplicate of #309
Author
Owner

@vi commented on GitHub (Dec 16, 2017):

So the answer is "it is async, but need to fix some issues".

<!-- gh-comment-id:352147134 --> @vi commented on GitHub (Dec 16, 2017): So the answer is "it is async, but need to fix some issues".
Author
Owner

@bluejekyll commented on GitHub (Dec 16, 2017):

To be accurately, internally it is async, but I never really exposed a library interface to use it inside something other than the named binary.

So yes, there is some minor cleanup needed to expose the futures based interfaces properly.

<!-- gh-comment-id:352156270 --> @bluejekyll commented on GitHub (Dec 16, 2017): To be accurately, internally it is async, but I never really exposed a library interface to use it inside something other than the named binary. So yes, there is some minor cleanup needed to expose the futures based interfaces properly.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#140
No description provided.