Wikipedia over DNS

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


Recent Entries

Comments

Oldest comments listed first.

Posted by: ThreadAbort on January 5, 2009 at 10:04 PM

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


Leave a comment


Subscribe to MAKE!Subscribe to MAKE Magazine!

Subscribe today, save 42% and get web access to MAKE free. MAKE Digital Edition is available only to subscribers.

$34.95 / 1 year
(4 Quarterly Issues)

Subscribe now


Void your warranty, violate a user agreement, fry a circuit, blow a fuse, poke an eye out. Make: The risk-takers, the doers, the makers of things... Welcome to Make: Online!


CRAFT Maker Shed Maker Faire MAKE television




Check out more videos from MAKE.

Maker SHED

Connect with MAKE

Be a MAKE fan on Facebook MAKE on Facebook
Visit our Facebook page and become a fan of MAKE!
MAKE on Twitter MAKE on Twitter
Follow our MAKE tweets!
MAKE Flickr Pool MAKE on Flickr
Join our MAKE Flickr Pool!
    make_tips on Twitter



    MAKE Archives

    Make: Money

    Make: Science Room
    Subscribe to MAKE Magazine!

    Make: Online editors and authors!

    Gareth BranwynGareth Branwyn
    Editor-in-Chief


    Phillip TorronePhillip Torrone
    Senior Editor
    | Web | Twitter


    Becky SternBecky Stern
    Associate Editor
    | AIM | Twitter


    Marc de VinckMarc de Vinck
    Contributing Writer
    | AIM | Twitter


    John ParkJohn Park
    Contributing Writer
    | Twitter


    Sean RaganSean Ragan
    Contributing Writer
    | Twitter


    Matt MetsMatt Mets
    Contributing Writer
    | AIM | Twitter


    Dale DoughertyDale Dougherty
    Editor & Publisher
    | Twitter


    Shawn ConnallyShawn Connally
    Managing Editor
    | Twitter


    Goli MohammadiGoli Mohammadi
    Associate Managing Editor

    Kip KayKip Kay
    Weekend Projects
    | AIM | Twitter


    Collin CunninghamCollin Cunningham
    Contributing Writer
    | AIM | Twitter

    Adam FlahertyAdam Flaherty
    Contributing Writer
    | AIM | Twitter


    John BaichtalJohn Baichtal
    Contributing Writer
    | AIM | Twitter



    More contributors: Mark Frauenfelder (Editor-in-Chief, MAKE magazine), Kipp Bradford (Technical Consultant/Writer), Chris Connors (Education), Diana Eng (Guest Author), Peter Horvath (Intern), Brian Jepson (O'Reilly Media), Robert Bruce Thompson (Science Room)

    Suggest a Site!

    Advertise here with FM.

    Why advertise on MAKE?
    Read what folks are saying about us!

    Click here to advertise on MAKE!



    Current Podcast

    itunesdl.gif Behind the Scenes at MAKE and CRAFT In January, many of the remote MAKE/CRAFT team members (myself included) convened at the Maker Media headquarters at O'Reilly Media in Sebastopol, California. Take a look behind the scenes of your favorite DIY publications as Goli Mohammadi gives us... More...

    Get the Make: Online sent via email
    Enter your email to receive Make: Online each day:



    Sign up for the Make: Newsletter

    Our Make: Newsletter covers news from maker Media, has original columns, Shed deals, and more! You can also read the archives of past issues.


     



    MAKE Fascination video series brought to you by Dow

    Make: Education
    MAKE: en EspaƱol MAKE: Japan
    Important please read


    Subscribe to MAKE Magazine!

    Recent Posts from the Craft: Blog