More DNS tinkering

robin nospam at acm.org
Fri, 12 Mar 1999 02:45:40 GMT

I further refined my experiments at using DNS to serve live data from
my own database of CDs. I added tracks to the database and modified
the format of the whole-toc key.

Thanks to Greg, the demo is available at [QUERY].ro.cdin.org as well
as [QUERY].cd.ro.nu.

The queries supported are:
key-to-artist artist-to-key
key-to-cddbid cddbid-to-key
key-to-composer composer-to-key
key-to-performer performer-to-key
key-to-title title-to-key
key-to-toc toc-to-key
key-to-tracks
key-to-track[N]

The toc parameter is now encoded in a more efficient way to improve the
chances of it fitting within the DNS implementation limits. It is just
the frame offset to the first track, in hex, followed by the lengths of
each track, again measured in frames and printed in hex.

The awkward disks which broke before are happy now (try looking up
keys 10099, 10080 and 10084, which all have >90 tracks).

An example client dialogue might go:
$ host -t txt 20.d4da.b162.627f.7c04.8043.aa23.5bc7.b5d8.toc-to-key.ro.cdin.org.
20.d4da.b162.627f.7c04.8043.aa23.5bc7.b5d8.toc-to-key.ro.cdin.org descriptive text "key=10039"
$ host -t txt 10039.key-to-title.ro.cdin.org.10039.key-to-title.ro.cdin.org descriptive text "title=symphony4 op60 and symphony5 op67"
$ host -t txt 10039.key-to-composer.ro.cdin.org.
10039.key-to-composer.ro.cdin.org descriptive text "composer=beethoven"
$ host -t txt 10039.key-to-tracks.ro.cdin.org.
10039.key-to-tracks.ro.cdin.org descriptive text "tracks=8"
$ host -t txt 10039.key-to-track1.ro.cdin.org.
10039.key-to-track1.ro.cdin.org descriptive text "track1=Symphony No. 4 in B Flat, op. 60/ I. Adagio-Allegro vivace"
...
$ host -t txt 10039.key-to-track8.ro.cdin.org.
10039.key-to-track8.ro.cdin.org descriptive text "track8=IV. Allegro"

Robin.

-- 
R.M.O'Leary <robin nospam at acm.org> +44 7010 707044  PO Box 20, Swansea SA2 8YB, UK