3 ms·
What is updated every 3600 seconds here? The entire breckyunits.com zone? The "ipv4" record? the ipv6 record? both? Zone files can express all of those easily,
by vidarh 13y ago
What is updated every 3600 seconds here? The entire breckyunits.com zone? The "ipv4" record? the ipv6 record? both?
Zone files can express all of those easily, and need to. To be able to replicate their functionality, your DSL would need to be able to handle TTL's for each and every record.
To me, your example is extremely ambiguous. It is certainly not self documenting. Because I happen to know DNS, I'd assume you're assigning a TTL for all the records of 3600.
But how can I set the TTL only for one of them?
And how do I add records for subdomains? Do I have to repeat the full name every time? Because that's a non-starter.
And do you realize you've actually made this massively harder to work on with simple tools? Bind zone files keeps all except the SOA record on one line. This means that with some simple conventions, a site can easily format everything so that a single record can always be manipulated simply by operating on a single line of text. That makes it trivial to e.g. modify zones files in shell scripts with tools like "awk" etc.
Almost anyone that needs to read and write zone files have advanced requirements - or we'd use a more user friendly, high level tool. And so a replacement would need to meet those requirements, including being able to write records on a single line, and being able to refer to the origin and use relative names.
- breck 13y agoGreat questions. Now I'm having to think about implementation more. Here's the basics of a system: /domains/ /domains/google.com.space Let's say the key requirements are: 1.) Domain pattern + ip address 2.) Some expiration timestamp 3.) Some property that tells you who told you that domain matched that IP The contents of file "google.com.space" then could be something like this: ip4 123.123.123.123 expiresEvery 3600seconds lastUpdated 2/2/2013 4:00pm receivedFrom dns.verizon.com For subdomains, you could do a "/domains/foobar.google.com.space" file, or maybe a "/domains/*.google.com.space" file, or maybe you just put them in the file above like so: ip4 123.123.123.123 expiresEvery 3600seconds lastUpdated 2/2/2013 4:00pm receivedFrom dns.verizon.com subdomains mail.google.com ip4 123.123.123.123 ttl 3600 Et cetera. The implementation details would be very important. There are plenty of sub decisions to make to come up with a great DSL. But I'm fundamentally confident that at the root level, the decision to create a Space based, object oriented domain system is not only correct, it is inevitable. It just feels right to me. Again, I've had the benefit of working with this structure for a while now, and am amazed at how so many things simplify down to it. Space is object oriented programming in an extremely simple, concise, robust, human readable way. Just as most (if not all) major computer programs nowadays are written in an object oriented way, I am predicting there will come a time when most major message passing systems are written in a Space encoded way. > That makes it trivial to e.g. modify zones files in shell scripts with tools like "awk" etc. I look at awk and I think that's something that will at some point be buried, and should be. awk is kind of like a neanderthal or some other species in between ape and human. Served it's purpose, helped the evolutionary chain, is a very honorable tool, but at some point will go extinct.