mirror of
https://github.com/yswery/PHP-DNS-SERVER.git
synced 2026-04-25 17:25:53 +03:00
[GH-ISSUE #5] Provder = Resolver? #3
Labels
No labels
bug
enhancement
enhancement
hacktoberfest
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/PHP-DNS-SERVER#3
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 @codenamegary on GitHub (Nov 20, 2014).
Original GitHub issue: https://github.com/yswery/PHP-DNS-SERVER/issues/5
It occurred to me while going through setting up the testing that maybe "Provider" is not the best term for what the role of the provider is. I was thinking about maybe creating a Resolver interface... for example.
And then logically it would follow that...
Not at all urgent, just food for thought. Seems like a reasonable abstraction given that I'm already thinking about creating a StackedProvider where get_answer() would query some JSON based records first and then fall back to query some other DNS server if the question was unanswered.
@yswery commented on GitHub (Nov 20, 2014):
I like the idea. but first we need to implement the recursive DNS ability (to be able to pass on a DNS query to the name server of the give domain question)
Currently speaking the library is an authoritative nameserver only, meaning no recursion at all. However I would love to go into the future to enable queries outside and implementing what you suggest with the fall back if the domain record is not in storage.
This issue could probably be renamed to implementing a new feature which is the ability to make recursive DNS queries, and added to the to do list
@codenamegary commented on GitHub (Nov 20, 2014):
Oh for sure, might as well close this for now, was just a thought. :)
@yswery commented on GitHub (Nov 20, 2014):
Na, dont close it, this abstraction will defiantly be a must.
In the upcoming weekend I will have some time and I will implement some back functionality to be able to do a recursive dns query if the domain is not in storage
@codenamegary commented on GitHub (Nov 21, 2014):
Excellent. Not sure what your thoughts are around how to implement that, but here's a thought.
https://gist.github.com/codenamegary/88d86fc01b048f539601
@yswery commented on GitHub (Nov 22, 2014):
Initially I was thinking of adding the recursive functionality to the server, but on second thought its probably better be more as a provider here as you mentioned, ill follow your gist, seems like a solid idea
@yswery commented on GitHub (Nov 22, 2014):
pushed some initial code into the feature/recursive-provider branch i will finish this later today
@yswery commented on GitHub (Nov 23, 2014):
Done, feel free to re-factor and write tests, sadly I really didnt have as much time as I wanted for this this weekend :(