Re: Cassandra and concurrent programming

2011-05-16 Thread Mark Kerzner
Thank you for a quick answer - I could impress my colleagues at the meeting :) On Mon, May 16, 2011 at 2:54 PM, Peter Schuller wrote: > > In threading, you would do an atomic "put if not present," is there such > a > > thing in Cassandra? > > No. In general, one works to avoid the need for stron

Re: Cassandra and concurrent programming

2011-05-16 Thread Peter Schuller
> In threading, you would do an atomic "put if not present," is there such a > thing in Cassandra? No. In general, one works to avoid the need for strong co-ordination. If strong co-ordination is truly required, some external method is required. Some people use ZooKeeper (http://zookeeper.apache.o

Cassandra and concurrent programming

2011-05-16 Thread Mark Kerzner
Hi, guys, what happens if I have two threads or two processes, both of which need to ask if some condition in Cassandra is fulfilled, and then, say, write the data based on that. If one receives the "no" answer and decides to write, but before he does, the other one receives the "no" answer and wr