Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

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

DZone's Guide to

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

· Cloud Zone ·
Free Resource

See why enterprise app developers love Cloud Foundry. Download the 2018 User Survey for a snapshot of Cloud Foundry users’ deployments and productivity.

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.

Cloud Foundry saves app developers $100K and 10 weeks on average per development cycle. Download the 2018 User Survey for a snapshot of Cloud Foundry users’ deployments and productivity. Find out what people love about the industry standard cloud application platform.

Topics:

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}