I think the anti-pattern is more about the read/write trying to be atomic.

You might want to logically lock your record unless you are pretty sure you 
have figured out how to keep users from overwriting each others edits is all.

tc

From: Robert Wille [mailto:rwi...@fold3.com]
Sent: Friday, January 10, 2014 4:52 PM
To: user@cassandra.apache.org
Subject: Re: Read/Write consistency issue

Interested in knowing more on why read-before-write is an anti-pattern. In the 
next month or so, I intend to use Cassandra as a doc store. One very common 
operation will be to read the document, make a change, and write it back. These 
would be interactive users modifying their own documents, so rapid repeated 
writing is not an issue. Why would this be bad?

Robert

From: Steven A Robenalt <srobe...@stanford.edu<mailto:srobe...@stanford.edu>>
Reply-To: <user@cassandra.apache.org<mailto:user@cassandra.apache.org>>
Date: Friday, January 10, 2014 at 3:41 PM
To: <user@cassandra.apache.org<mailto:user@cassandra.apache.org>>
Subject: Re: Read/Write consistency issue

My understanding is that it's generally a Cassandra anti-pattern to do 
read-before-write in any case, not just because of this issue. I'd agree with 
Robert's suggestion earlier in this thread of writing each update independently 
and aggregating on read.

Steve

Reply via email to