Announcing Couchbase for Mobile

Showing 1-2 of 2 messages
Announcing Couchbase for Mobile J. Chris Anderson 1/31/13 2:51 PM

Some of you are already trying out our Sync Gateway. Thanks for your early feedback! We've also been writing example apps and putting it through its paces, and we really like it. We like it so much that we're planning to build the future of Couchbase for Mobile around it.

(Veterans may recognize the name ‘Couchbase Mobile’ as our old mobile database from 2011. We’re now repurposing the name as an umbrella for our overarching effort, including the server-side components as well as the native mobile database.)

Previously, our Syncpoint technology tried to address was the management of independent databases for each sync channel. This was a bit of a kludge, due to inherent limitations in the Apache CouchDB filtered replication and security model.

Couchbase for Mobile takes a new approach, using the incremental index capability of Couchbase Server 2.0 for synchronization, so your data lives in scalable storage and channels are lightweight. Documents can also belong to multiple channels, and be visible to multiple users, without making redundant copies on the server.

We've talked to a few of you about this new lightweight channel model, and the feedback has been overwhelmingly positive. Channel membership is determined by a channel map function. Here's an example channel mapper which would allow documents to be tagged with owners and members.

function(doc) {
  if (doc.owner_id) {
  if (doc.members) {
    for (var i = 0; i < doc.members.length; ++i)
      sync(“member-“ + doc.members[i]);

The other half of the model is the Sync Gateway authorization API for declaring which channels each user can access. Essentially, each user account on the Sync Gateway includes a list of channels the user has access to. The user can only read documents tagged with one of those channels, and replication will automatically be filtered to those channels.

Based on the feedback we've received, this model should be composable in lots of different ways. For instance in the example wiki and chat applications, each chat room or different wiki corresponds to a channel. Each chat room has many messages, and each wiki may have multiple pages. So in these apps, a user will typically be a member or owner of a handful of channels. In other apps, each user may only sync from a single channel, with a name corresponding to their user name. Or you might have a channel for large photos, and another channel for smaller thumbnails, and sync the large photo channel only when connected via WiFi.

There's still a lot left to do before Couchbase for Mobile is ready for prime time. We hope to have our an early version out in just a few months. This will focus on proving out the channel model. For later versions, we'll focus on performance and scalability, as well as adding any missing features identified by the early users.

As part of ratcheting up our focus on mobile, we've decided to rename TouchDB to Couchbase Lite. This is not a technical change. We'll continue to use the same backwards compatible CouchSync protocol, so you can rest assured we aren't breaking compatibility with existing sync backends. And we are excited to be building what will become the best-in-class integrated synchronization solution.

Re: Announcing Couchbase for Mobile J. Chris Anderson 1/31/13 3:43 PM
If you want to get started, we've got a jumping-off point here:

I can't wait to see what you build!