Syncing data with Mobile CouchBase

As anyone who’s used one of Amazon’s Kindle apps knows, synchronization without user interaction is a priceless feature.  As any programmer who’s built an app that persists data across multiple devices knows, synchronization takes a lot of work.

A todo list for accomplishing this task might look something like this:

  1. Ensure the device has connectivity
  2. Check last sync date
  3. Request newest items from server
  4. Parse response
  5. Check for existence of items.  If new, insert new records.  If existing, update attributes.
  6. Save current sync date
  7. Repeat as necessary

Then there’s the reverse for when data is created on the mobile device.  Not only does a developer need to handle transitions in connectivity, offline to online, but also dropped connections in the middle of a sync.  Doing this right takes a lot of time, consideration, programming and let’s not forget QA.

Enter Mobile CouchBase.

Earlier this year, Membase and CouchOne merged to create CouchBase.  One of the components of this merger is Mobile CouchBase, initially an iOS-only implementation for storing, persisting and synchronizing data with a web-based backend from mobile apps.  CouchBase is leveraging a key-value datastore not unlike the NoSQL solutions powering scalable websites.

I’m reminded of my first introduction to Amazon Web Services.  Amazon took painstaking tech-heavy tasks like acquiring and configuring web deployment infrastructure and made it a simple focused task.  Removing that complexity from the process of building rich web applications lowered the barrier of entry for a plethora of products and services to get up and running with a much smaller budget.

Whether or not Mobile CouchBase will do for mobile syncing what Amazon did for cloud computing remains to be seen.  It does, however, underscore the potential for a distinct and foundational layer in ubiquitous computing poised to make the transition to a commoditized product or service.  Once we as developers can forget about this layer we should expect to see a burst in the number and quality of mobile applications.

To implement Mobile CouchBase in your own iOS app, visit their github repository here.