On Mon, Apr 5, 2010 at 1:46 PM, Paul Prescod <p...@ayogo.com> wrote: > On Mon, Apr 5, 2010 at 1:35 PM, Mike Malone <m...@simplegeo.com> wrote: > >> That's useful information Mike. I am a bit curious about what the most > >> common use cases are for atomic increment/decrement. I'm familiar with > >> atomic add as a sort of locking mechanism. > > > > They're useful for caching denormalized counts of things. Especially > things > > that change rapidly. Instead of invalidating the counter whenever an > event > > occurs that would incr/decr the counter, you can incr/decr the cached > count > > too. > > Do you think that a future cassandra increment/decrement would be > incompatible with those use cases? > > It seems to me that in that use case, an eventually consistent counter > is as useful as any other eventually consistent datum.
An eventually consistent count operation in Cassandra would be great, and it would satisfy all of the use cases I would typically use counts for in memcached. It's just a matter of reconciling inconsistencies with a more sophisticated operation than "latest write wins" (specifically, the reconciliation operation should apply all incr/decr ops). Mike