couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Metson <si...@cloudant.com>
Subject Re: distributed counters
Date Wed, 29 Jan 2014 15:47:49 GMT


On Wednesday, 29 January 2014 at 15:34, Benoit Chesneau wrote:

> On Wed, Jan 29, 2014 at 3:31 PM, Simon Metson <simon@cloudant.com (mailto:simon@cloudant.com)>
wrote:
>  
> > I started futzing around with a crdt-like counter a while back. Will dust
> > it off when I get a chance.
>  
>  
> Thanks! Which design did you choose? Using 1 doc to keep all the state?
> Anything else ?
>  

Multiple docs (recording increments and decrements) and a view to calculate the sum for a
given counter, with some client side logic. I think it’s the only way to have an available
counter in a multiple node system. Incrementing a count on a single doc is going to result
in conflicts, and potentially lost counts.
Cheers
Simon


Mime
View raw message