couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <>
Subject Re: Bigcouch vs couchbase
Date Wed, 26 Mar 2014 15:21:43 GMT

On Mar 26, 2014, at 12:43 AM, Stanley Iriele <> wrote:

> How does bigcouch handle multiple simultaneous writes ? Is it first to
> write?.... How is couchbase different?…

In Couchbase Server the key-space is partitioned among the nodes in the cluster, so each key
is ‘owned’ by one node at a time. So for any one key there is strict causality, i.e. a
total ordering of events. Couchbase doesn’t have MVCC nor does it store histories of documents.
Instead every document has a “CAS” value which is basically a 64-bit change counter. You
can perform optimistic updates by using a set-with-CAS operation that will fail if the document’s
current CAS doesn’t match the value you supplied. There’s also a Lock operation to obtain
a temporary lease on a key, and a handy Increment operation that operates atomically on integer-valued
(non-JSON) keys.

AFAIK, BigCouch also partitions the key-space, in which case it doesn’t have simultaneous
writes either.

That said, these are two rather different databases. Couchbase Server is faster (it’s faster
than just about anything else) and probably more scaleable, but its durability/consistency
guarantees are weaker, and its replication between clusters (XDCR) isn’t nearly as advanced.

View raw message