CouchDB in the Browser

Atul Varma of Mozilla has created a javascript implementation of the CouchDB api in the browser. Note this isn't the actual CouchDB backend, it's a javascript re-implementation that mimics it.

This is quite exciting as the first step to full browser integration of the CouchDB API. Now, if you thought CouchDB was all about the cloud with huge clusters and Map/Reduce, you are probably wondering "Why put it in the browser?"

Because CouchDB is as much about data movement and locality as it is about being the "cloud".

I think most people think of cloud computing as a way to temporarily get access to large clusters of machines, for doing things like large scale number crunching or handling massive floods of traffic. In the past, that's where cloud computing has had a lot of success, building and housing massive clusters is very expensive. But it's only half of the cloud computing story, and I think in the grand scheme of the things, it's the less important half.

The real future of cloud computing about being a simple, low cost, high availability way to get your data and applications online, saving you the cost and hassle of building and maintaining your own infrastructure. You aren't just saving yourself from building a cluster, but from installing applications, applying patches, monitoring security, keeping backups, etc. Your cloud provider maintains the applications while making sure your data is safe, secure and accessible. They worry about the infrastructure so you don't have to. Think Google Docs and Salesforce.com.

However the problem with the cloud is it forces you to store all your data remotely. It's only highly available if *you* can get to it. If you can't get a good connection (overloaded pipe, weak signal, intermittent connection, no connection, latency, etc), then all that data center expertise, hardware and bandwidth is useless. That's the problem with the cloud, it's can only be as reliable as *your* connection to the internet.

This is the problem that CouchDB is designed to solve. Not just putting your data and apps into the cloud, but onto your laptop, your phone and your local office server. Fully query-able and editable in your browser, your data is available wherever you are, despite network outages, air travel or blocked access.

And it's not just files and documents, but whole entire applications, with all the application code, html and images stored right in the database and replicates along with your data. If you need a CouchDB application that's on your laptop to also be on your phone, just replicate it over. Use the app and makes changes on your phone and replicate back to the laptop, or up to the cloud and then replicate the laptop with the cloud. Your data and apps everywhere you want it.

We aren't there just yet, but its coming. Soon.

Posted April 17, 2009 1:22 PM