NoSQL Zone is brought to you in partnership with:

Mitch Pronschinske is a Senior Content Analyst at DZone. That means he writes and searches for the finest developer content in the land so that you don't have to. He often eats peanut butter and bananas, likes to make his own ringtones, enjoys card and board games, and is married to an underwear model. Mitch is a DZone Zone Leader and has posted 2573 posts at DZone. You can read more from them at their website. View Full User Profile

CouchDB Ready For Android

08.10.2010
| 14159 views |
  • submit to reddit
Having finished integrating Apache CouchDB with Palm's WebOS, Couchio moved on to the Android platform, which is now compatible with web-based and native CouchDB apps.  Couch Apps can leverage peer-to-peer synchronization and several other advantages from being a non-relational database.  DZone talked to Chris Anderson, a co-founder of Couchio and the "Vice President of Hair", about today's release.

With continuous connectivity to a local copy of the data, developers can use web technologies to build applications once for the web, once for each mobile platform, and then synchronize between those platforms.  Applications can access data for free across devices, desktops, or in the cloud, regardless of the network.  

Damien Katz, the creator of CouchDB and CEO of Couchio said, “Our goal is to provide users with a kick-ass SDK for Android devices to build web and native applications using CouchDB as the device-native data store.  Now, developers can use all their knowledge about web technologies to build apps on mobile devices.”

Here is DZone's quick interview with Chris Anderson:

DZone: Couch apps can already be built for Palm, and now for Android too.  How is CouchDB able to work on multiple mobile and desktop operating systems and sync data across Couch apps on those differing operating systems?  What development work was required to make CouchDB work with each OS?

Chris Anderson:  Building for Android was simple - under the covers it is just another Linux. The first step was running the standard Apache CouchDB code base there. Now we are optimizing it for mobile conditions: use less memory, respect battery life, and provide native APIs for Android app developers.

CouchDB is able to interoperate across mobile platforms, desktops, and the cloud, because CouchDB replication (like all its operations) takes place over HTTP, the same protocol that drives the web.

CouchDB is also well suited to the harsh conditions of mobile devices: the storage engine is designed to be consistent at all times, so even in the event of power failure or unexpected shutdown, all stored data is safe.

Palm is a special case - they have an internally developed database called db8, that is designed to replicate with CouchDB in the cloud. This allows Palm webOS programs to make their data available to any software designed to work with CouchDB, by replicating to a CouchDB instance in the cloud.

DZone:  Can a developer write a CouchDB app once that will run on Palm, Android, and any other supported OS?  

Chris
:  CouchDB applications can be written using web technologies like HTML, CSS, and JavaScript, but it is also simple to interact with CouchDB from any programming language such as Java or Objective-C. For instance, a mobile app can be written in the native language of the phone, saving data to CouchDB. Then a web app can read that data, which makes CouchDB an ideal way to bridge the native development and the web.

DZone:  What are some of the ways in which Couch apps compare/contrast with applications like Dropbox and MobileMe?

Chris:  CouchApps are developer friendly and general purpose. DropBox is just for sharing files, while CouchApps are full fledged dynamic database backed applications. MobileMe is similar to DropBox, it is also focused on sharing files.

CouchApps are a simpler method of developing web applications. They can be used to replace Ruby on Rails or Django, with a simpler deployment environment, and a code base that is horizontally scalable from day one.

For more technical information on CouchApps, see: http://couchapp.org/page/what-is-couchapp

For a list of example CouchApps in the wild, see: http://couchapp.org/page/list-of-couchapps

The CouchDB SDK for Android is now available for free download.  You can directly install CouchDB via the Android Marketplace.