Just got back from Interop where I was part of a panel that talked about cloud computing. We discussed a lots of interesting topics like migration, scaling, hybrid clouds and what not. NoSQL was definitely a discussion point since I personally believe you can’t talk about cloud without also talking about NoSQL.
The scaling part though got me thinking. The current approach for scaling any cloud app is to use your IaaS provider to just add more compute power and deal with it. I tend to think a little differently from this. xtractr on pcapr for example, uses a hybrid cloud model. You download a single binary that you use for indexing large packet captures. When you now want to search, extract, report on this, the application is delivered to your browser which then uses JSONP (until HTML5 is truly prevalent with cross-domain Ajax requests) to communicate to your instance of the xtractr. What this means is when you are busy crunching packets, the server load on pcapr is zero! Which implies infinite scaling, ‘cos the load is truly distributed across all of our users.
DNS
DNS is something that we all use everyday. It’s intricately wound up into the fabric of the Net. Oversimplified, DNS maps human-readable domain names into cryptic IP addresses. But if you pause for a moment and think about it:
DNS was the first NoSQL, multi-master, pull replication, distributed document database that was created over 20 years ago!
With DNS, nobody is running a DNS cloud. Instead the information contained is truly distributed in the form of DNS servers that anyone can access. All you need is the next authoritative hop and the redirects (rcode == name-error) and caching (TTL in the resource records) automatically distribute the data at run-time. If a server goes down, the next server is tried and life just goes on. Nobody owns or holds all of the DNS records.
This is beautiful sharding at work, on a global scale.
You can think of a record in DNS as a document. And yes there are multiple types of documents like CNAME, A, AAAA, TXT etc. Each document has something called a TTL which tells you how long this document can exist before it needs to be fetched again from the source.
CouchDB
The parallels between DNS and CouchDB are just too striking. CouchDB is a fully distributed JSON document store with multi-master replication and map/reduce for queries. I was idly wondering (had some time at the airport) how a CouchDB-based DNS server would look. In other words all you run is CouchDB and you resolve domain names by doing HTTP requests to your server. If you patch gethostbyname to now talk HTTP, this will be transparent to applications.
BTW, you can administer your DNS server purely through the Futon UI or we can build a CouchApp for that as well using the show and list functions. You don’t have to deal with gnarly label compression issues, pointer loops in resource records and other crazy things under the hood. Just plain old JSON documents. And you get to replace DNSSEC with HTTP Digest Authentication. Like I said, idle dreaming.
DNS Records as JSON
This is prolly the simplest of all. Each DNS record with all its gory details exists as a simple JSON document. For example an A record might look like this:
{
type: "a",
address: "1.2.3.4"
}
and here’s an SOA (start of authority) record
{
type: "soa",
mname: "mudynamics.com",
rname: "root.mudynamics.com",
serial: 2009010800,
refresh: 10800,
retry: 1800,
expire: 604800,
minimum: 86400
}
Now in order to lookup domain name, you would just have a view that emits the name and address which are then returned as answers. With CouchDB list functions you can easily provide a nice little RESTlet to resolve domain names. For example:
http://1.2.3.4/db/_design/domains/_list/resolve/q?key="mudynamics.com"
Caching and Replication
Let’s say you get a request for a domain that doesn’t exist (it’s not in the view index), you can either generate an HTTP redirect to the next hop or recursively fetch the document from the next hop. The DNS protocol itself has an RD (recursion desired) bit that tells the server what to do. Either return a 404 Not Found or pursue the next hop. As long as the records that are exchanged between CouchDB instances set the HTTP Cache: header to match the TTL of the records, you effectively get to use the CDN’s deployed all over for caching. :-)
We do need to handle TTL expiration which will cause CouchDB to automatically delete documents which of course auto propagates during replication.
Topic Cloud
Here’s another example for you to consider. Let’s say we use the domain name dotted notation for various topics (similar to newsgroups alt.computers.sale or comp.lang.ruby). So I can bring up a CouchDB instance that has various JSON objects about say, packets. My authoritative server tells the whole world all there is to know about packets. Now when I bring up this app and add it to the Topic Cloud, replication kicks in and pretty soon people looking for all.about.packets start replicating from my app. How cool is that? If I have a my.family.pictures, then I’m going to only allow my family to replicate the documents from my server using HTTP Authentication. Simple, no?
The Network News Transfer Protocol did exactly this, but the big difference when using CouchDB is:
The app itself, along with the data, is replicated and cached!
Disclaimer
Okay, there are a million reasons why this wouldn’t work and why you shouldn’t even attempt anything like this, but the point of the blog is just to use DNS as one example of a truly distributed document store with pull replication that doesn’t require requesting another instance of a compute quanta to scale your cloud app. Since the documents are all over the servers with nice caching in the middle, you get infinite scale as long as people participate.
So if you have some free cycles, get on with GitHub and go nuts with this idea. Git, BTW, is another great example of completely decentralized revision control system. Linus has already talked quite a bit about this, so I’ll stop already.

Pingback: Jan-Piet Mens » DNS backed by CouchDB
Pingback: Jan-Piet Mens » DNS backed by CouchDB redux
Pingback: Buy Facebook Fans
Pingback: guaranteed rankings
Pingback: best supplements for muscle gain
Pingback: Dallas Video Production
Pingback: Dallas Advertising
Pingback: Dallas Boudoir Photographer
Pingback: James Bond Books
Pingback: Dallas Wedding Photographers
Pingback: Dallas Family Portrait Photographer
Pingback: Warp Drives
Pingback: best supplement for muscle gain
Pingback: best bcaa
Pingback: Liverpool Live Stream
Pingback: Cruises Deals
Pingback: colorado unemployment
Pingback: handheld vaporizer
Pingback: Porn forum
Pingback: best radar detectors
Pingback: kredyty chwilowki
Pingback: honolulu seo
Pingback: Free Dell XPS M1530
Pingback: site
Pingback: oc escort
Pingback: shopify review
Pingback: Best Hotel Rates
Pingback: ingilizce egitim
Pingback: Alvin Blog
Pingback: Care Manager Jobs
Pingback: Work At Home Business Opportunities
Pingback: Super Bowl 46 Picks
Pingback: Fireless Fireplace
Pingback: Wedding photographers in Miami
Pingback: Organo Gold
Pingback: Pokemon Rom Hacks Download
Pingback: project payday review
Pingback: facebook smiley penguin
Pingback: palomar airport
Pingback: lethbridge real estate
Pingback: Minneapolis SEO
Pingback: Zoofachhandel
Pingback: spamfilter
Pingback: send flowerrs to sri lanka
Pingback: i hate my job
Pingback: fitness workout program
Pingback: What are some things that help Teenage Acne
Pingback: Jennifer Ellison hot
Pingback: noclegi zakopane
Pingback: dating sites
Pingback: how to start website
Pingback: brain supplements
Pingback: how to make money from home
Pingback: hugeyields
Pingback: what is serotonin
Pingback: how to become a guy magnet free
Pingback: get blood out of sheets
Pingback: questions to ask a girl
Pingback: Plus size cocktail dresses with sleeves
Pingback: Laser Hair Removal From Home
Pingback: commercial property inspection
Pingback: Gardening
Pingback: dog snuggie
Pingback: love
Pingback: LLC formation review
Pingback: handwriting expert
Pingback: Scott Tucker Racing
Pingback: Scott Tucker Racing
Pingback: Scott Tucker CBS
Pingback: Scott Tucker CBS
Pingback: Scott Tucker CBS
Pingback: Scott Tucker Leawood
Pingback: passive income
Pingback: click here
Pingback: Scott Tucker Racing
Pingback: Justin Bieber Baby
Pingback: clearwater beach condo
Pingback: corporate video production nyc
Pingback: Broker Price Opinion
Pingback: Scott Tucker CBS
Pingback: Scott Tucker CBS
Pingback: REO Companies
Pingback: broker price opinion
Pingback: lipo 6 side effects
Pingback: e-cigs
Pingback: steven cymbrowitz
Pingback: best payday loan
Pingback: Best wheels for sliding
Pingback: tattooed makeup Melbourne
Pingback: boot camp training
Pingback: ecommerce seo
Pingback: Website Hosting
Pingback: unlocked cell phones reviews
Pingback: open in a new browser window
Pingback: football speed
Pingback: prizes
Pingback: MORTGAGE
Pingback: Video
Pingback: Hockey News
Pingback: Reisehaartrockner
Pingback: Proactol Plus
Pingback: maryland short sale attorney
Pingback: Air Conditioning Maintenance
Pingback: malibu beach house
Pingback: springfield door hangers
Pingback: escorts in london
Pingback: Robert Shumake
Pingback: create a minisite
Pingback: Project Payday scam
Pingback: Discount Bathroom Centre
Pingback: turism
Pingback: free cam porn
Pingback: treadmill for home
Pingback: Michael Lacey
Pingback: learn more about seo
Pingback: goals galore
Pingback: Taruhan bola
Pingback: author
Pingback: prediksi togel
Pingback: Scott tucker
Pingback: Scott Tucker CBS
Pingback: Scott Tucker Racing
Pingback: Scott Tucker Racing
Pingback: Scott Tucker CBS
Pingback: Electric Shaver Reviews
Pingback: Sex Show
Pingback: personal trainer certification
Pingback: just been paid out
Pingback: Kinky Curly curling custard
Pingback: cool games
Pingback: marketing with anik review
Pingback: Corded curtain poles
Pingback: Forbrugslan
Pingback: become a triathlon coach
Pingback: Fast SEO Results
Pingback: Video Presentations
Pingback: how to get a diet program
Pingback: raspberry keytone
Pingback: document solutions
Pingback: video cards deals
Pingback: Anwar Sadhe
Pingback: removals in south yorkshire
Pingback: overclocking software
Pingback: Marine performance parts
Pingback: merchant cash advance video
Pingback: bad credit business loans
Pingback: dildo wie echter schwanz
Pingback: cam sex
Pingback: Serum 15
Pingback: Free Hack Download
Pingback: injection moulding
Pingback: piles treatment in kerala
Pingback: dinnerware
Pingback: Swinging Door Traffic
Pingback: Kinderbetten günstig
Pingback: low rates Bakersfield California
Pingback: Hyundai Window Deflectors
Pingback: Background check
Pingback: hiphop beats
Pingback: juniors party dresses
Pingback: Hyundai Getz 2006- Headlights Cover
Pingback: reputation management
Pingback: BMW X3 E83 Window Deflectors
Pingback: running music
Pingback: Chevrolet Lanos Window Deflectors
Pingback: unitedcashloans
Pingback: yoga apparel stores
Pingback: unitedcashloans
Pingback: united cashloans
Pingback: contactos esporadicos
Pingback: maduras
Pingback: dennis ewert
Pingback: is hydroxycut safe
Pingback: myoplex
Pingback: auto insurance
Pingback: recurve bows for sale
Pingback: clothing
Pingback: bowflex selecttech 552 dumbbells
Pingback: Yoga Clothing
Pingback: www.floridahomeinsurancequotes.com
Pingback: wasserbetten preise
Pingback: Scrapeboard
Pingback: avid products santa monica
Pingback: fabricated jewelry
Pingback: tools ingrown
Pingback: taylor swift on tour
Pingback: taylor swift official website
Pingback: taylor swift videos
Pingback: taylor swift myspace
Pingback: Bed And Breakfast in Exeter
Pingback: sport bike gear
Pingback: red sox
Pingback: Scrapebox VPS Server
Pingback: joe rocket canada
Pingback: Scrapebox Server
Pingback: SEO
Pingback: solicitor
Pingback: PNC
Pingback: Margit Petrash
Pingback: Alden Romaniak
Pingback: Bail
Pingback: buy steroids
Pingback: Server
Pingback: Scrapebox VPS Server
Pingback: white bunk beds
Pingback: ways to make money
Pingback: Scrapebox VPS Server
Pingback: searscard
Pingback: Buy Blank Note Pads
Pingback: casque sans fil sennheiser
Pingback: flyttefirma
Pingback: millitary command centers
Pingback: game
Pingback: http://www.machineabiere.net/
Pingback: commercial mailboxes
Pingback: http://www.glaciereelectrique.fr/
Pingback: custom swimming pools
Pingback: Presidential Silver Coins
Pingback: Trade Gold For Cash
Pingback: cell phone towers
Pingback: hpv
Pingback: hpv
Pingback: camescope hd
Pingback: cheap car
Pingback: http://www.whiteceramicwatches.net/
Pingback: http://www.epilateurelectrique.net/
Pingback: home hair removal
Pingback: no no
Pingback: http://www.friteusesanshuile.net/
Pingback: http://www.rasoirelectrique.org/
Pingback: http://www.montregps.org/
Pingback: My Blog
Pingback: http://www.disquedurinterne.net/
Pingback: try her
Pingback: online tires.com
Pingback: click here
Pingback: dental implants
Pingback: piscine autoportante
Pingback: My Blog
Pingback: bad credit mobile phones
Pingback: write a childrens book
Pingback: accidents lawyers auto edwards ca
Pingback: http://google-redirect-virus-removal.org
Pingback: http://www.sacochehomme.org/
Pingback: free wireless credit card machine