Wikipedia over DNS

Technology

David Leadbeater created a service that distributes Wikipedia entries over DNS using TXT records. Simply looking up a TXT record for any subdomain of his service will pull a summary of the Wikipedia entry for the title of the same name.

I had written some code to take wikipedia articles and summarise them. I wanted to offer this for use in various places, now the obvious way to offer it is just a web service (via REST, SOAP, etc), but that’s boring and I had a cunning plan. Why not offer it over DNS – it is basically a huge associative array and DNS is designed for this stuff.

So I wrote a little nameserver which returns the results as TXT records. There are some obvious limitations for example responses are limited to around 430 bytes (it only does UDP). It has advantages too, it gets cached at your nameserver and it is also faster than HTTP (no need to setup a TCP session).

Here’s an example command line entry that will pull a summary of the Makezine article from Wikipedia:

host -t txt makezine.wp.dg.cx

makezine.wp.dg.cx descriptive text "Make (or MAKE) is a quarterly magazine published by O'Reilly Media which focuses on do it yourself (DIY) projects involving computers, electronics, robotics, metalworking, woodworking and other disciplines. The magazine is marketed to people who enjoy "ma" "king" things and features complex projects which can often be completed with cheap materials, including household items... http://a.vu/w:Make_(magazine)"

It’s basically a big hashtable of Wikipedia stored in SQLLite and served up by a custom DNS server, returning the info in a TXT record. The server code hasn’t been released yet, but it sounds like it’s written in Perl. It’s made by the author of Parse::MediaWikiDump and Text::Summary::MediaWiki, which he wrote to parse through the full Wikipedia dump and generate summary blurbs that will fit in the 430 byte limit.

Think about it. There’s just something fundamentally cool about the world’s greatest encyclopedia distributed and cached on name servers around the earth. Not that this particular hack will be used enough for that to happen, of course, but it’s interesting that it’s possible on existing infrastructure, without anyone having to install anything. A small glimpse of the future of universal cloud storage, all riding on the Internet’s oldest protocol.

Wikipedia over DNS
Slideshow from David’s presentation at the London Perl Workshop 2008

2 thoughts on “Wikipedia over DNS

  1. ThreadAbort says:

    For those who want to know how to do the same thing on a windows command line:

    nslookup
    set type=txt
    makezine.wp.dg.cx

Comments are closed.

Discuss this article with the rest of the community on our Discord server!
Tagged

ADVERTISEMENT

Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).

FEEDBACK