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

> On Wed, Jan 29, 2014 at 3:31 PM, Simon Metson <[email protected] 
> (mailto:[email protected])> 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

Reply via email to