InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

CouchDB as the Personal Database

Posted by Michael Hunger on Jun 08, 2010

Sections
Operations & Infrastructure,
Enterprise Architecture,
Development,
Architecture & Design
Topics
Search ,
NoSQL ,
Architecture ,
Mobile ,
REST
Tags
Android ,
iPhone ,
Database

While attending the Berlin Buzzwords NoSql conference, Jan Lehnardt (@janl) one of conference organizers and co-author of CouchDB: The Definitive Guide (a free O'Reilly book). presented a talk titled: "Making Software for Humans - CouchDB and The Usable Peer-to-Peer Web".

Jan ethusiastically spoke about his views of couchdb's important core features, being:

  • ease of installation
  • document based
  • JSON as the common subset of data types shared by all programming languages
  • Well behaved HTTP/REST interface and API
  • Clean and simple two tier applications (html+javascript in the browser + couch+javascript as server)
  • Couch Apps
  • Ability to scale up and DOWN
  • Availability on many platforms/devices, also mobile (Android, Nokias Maemo/MeeGo and hints on iPhone versions)
  • Built in synchronisation, conflict handling and replication
  • Performance
  • Views generated via map/reduce in javascript
  • Database change notification support via HTTP-Socket

 

Jan also stressed privacy issues and ownership of data, mentioning facebook and the diaspora project. One proposed solution could be to keep more personal data (or at least a safe copy) in a local couchdb instance. ("Every machine should run a webserver anyway - that is one the original ideas of the web."). If you have those instances on any of your machines then information as:

  • contacts
  • appointments
  • bookmarks and browse history
  • even email and IM messages

could be stored as documents in the database and automatically synched (on the database level) to couchdb instances on all the other devices you use. The impact of applying this thought could be immense. Having just one fast storage engine and storage format for all this kind of personal data could lead to cleaner document formats across all applications. It would be much easier to write any number of clients for some of this content as you don't have to care for storing, searching and backing up the data and the interface is very clean. Creating machine local mash-ups (that can extend into the cloud) should also become much easier.

 

During the break some participants discussed ways of architect solutions in this lean two tier way. If you use HTML5 and javascript in the browser as the client, it runs on all platforms. CouchDB+javascript via REST would be your server (with all the HTTP infrastructure in front of it). And node.js+javascript can be used for the heavy lifting. So it would be possible to put your business logic into javascript libraries and reuse it at any part of your architecture.

The videos of the conference will be available for free in a few days.

  • This article is part of a featured topic series on NoSQL

Related Sponsor

Neo4j is a robust, high-performance, scalable graph database. It is the only NOSQL database that solves the complex, connected data challenges that enterprises face today.

Yes, we do this already for developer support apps :) by Adam Nemeth Posted
Hate to be cynical, but... by Nicholas Calugar Posted
Re: Hate to be cynical, but... by Neil Murphy Posted
Re: Hate to be cynical, but... by Michael Hunger Posted
Video by Joao Cerdeira Posted
  1. Back to top

    Yes, we do this already for developer support apps :)

    by Adam Nemeth

    We have a digital Kanban board (distributed team, it has to be seen by others too), using couchdb, and a simple requirements tool, in which we can enlist the requirements for a given task in a TODO-list way (both for devs and testers)

    The kanban is based on SimpleKanban (which itself is based on jQuery), the requirements tool is based in extjs.

    Both were one or two workdays to write for a guy (different authors), sometimes we patch them to solve our needs better.

  2. Back to top

    Hate to be cynical, but...

    by Nicholas Calugar

    Why would I want to store contacts, appointments, email, and IMs on a local machine? Google does that all just fine for me and syncs with my phone. I have a web server on my local machine for development only...anything I can't afford to lose goes in the Cloud.

  3. Back to top

    Re: Hate to be cynical, but...

    by Neil Murphy

    I like the cloud concept but I don't always have access to the internet. Also if the cloud service disapepars, so does my data, so I would always want local control over my data.

  4. Back to top

    Re: Hate to be cynical, but...

    by Michael Hunger

    Control over your data is one thing. The article highlights that synching between as many CouchDB instances as you'd like makes your data available. Those couch instances can also be ones in the cloud it doesn't matter. But having a fast, consistent store for these types of data would make it much easier to work with it, mash it and write apps that use it.

    Michael

  5. Back to top

    Video

    by Joao Cerdeira

    Hi,

    Nice perspective, I think this is the future because I want to have my contact shared with my EEEPC, Comapany Laptop and my Android, but I don't want to give this information to Google or others.

    I'm a developer and if you want I can help you to move on with this idea.

    Can you send me the link to watch this presentation ?
    "The videos of the conference will be available for free in a few days."

    Regards,
    JC

Educational Content

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.