Over a million developers have joined DZone.

Couchbase Mobile: Multi-Master vs. Client-Server Models

DZone's Guide to

Couchbase Mobile: Multi-Master vs. Client-Server Models

· Cloud Zone ·
Free Resource

Discover a centralized approach to monitor your virtual infrastructure, on-premise IT environment, and cloud infrastructure – all on a single platform.

The syncing of mobile data is an important issue, ranging from clean and reliable (Pocket, for example) to spotty and erratic (Facebook, for example). In this recent article, Adam Wiggins of Wandering CTO discusses the Clue engineering team's solution to syncing mobile data: Couchbase Mobile.

The appeal of Couchbase Mobile, according to Wiggins, is the multi-master model, as opposed to the more common client-server model. With the multi-master model, your data is replicated in multiple locations - both on your device and on the backend - which gets around the problem of network connectivity. He describes the difference as follows:

The lightbulb moment for me came by thinking of the difference between client-server vs master-master syncing as the difference between Subversion and Git.

With Subversion, you can’t commit changes unless you can talk to the server. Unavailable or intermittent network connectivity blocks your ability to work. Git (and other DVCSes), on the other hand, store a copy of the revision control database (as the .git directory) with every repository. So you can work continuously without network, committing as you go. Git pull & push do a sync.

Wiggins makes a persuasive and concise argument in favor of the multi-master model, but poses a number of questions as well. For example:

  • How do you handle multi-tenancy?
  • How do you manage/authenticate users?
  • Where would backend logic run?

For more details on the Clue engineering team's work with Couchbase Mobile, as well as the conclusions they came to, check out Wiggins' full post.

Learn how to auto-discover your containers and monitor their performance, capture Docker host and container metrics to allocate host resources, and provision containers.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}