Re: Concurrency: Does C* support a Happened-Before relation between processes' writes?

2011-06-25 Thread AJ
On 6/25/2011 8:24 AM, Edward Capriolo wrote: I played around with the bakery algorithm and had ok success the challenges are most implementations assume an n size array of fixed clients and when you get it working it turns out to be a good number of cassandra ops to acquire your bakery lock. I

Re: Concurrency: Does C* support a Happened-Before relation between processes' writes?

2011-06-25 Thread Edward Capriolo
I played around with the bakery algorithm and had ok success the challenges are most implementations assume an n size array of fixed clients and when you get it working it turns out to be a good number of cassandra ops to acquire your bakery lock. On Saturday, June 25, 2011, AJ wrote: > On 6/24/2

Re: Concurrency: Does C* support a Happened-Before relation between processes' writes?

2011-06-24 Thread AJ
On 6/24/2011 2:27 PM, Jonathan Ellis wrote: Might be able to do it with http://en.wikipedia.org/wiki/Lamport%27s_bakery_algorithm. "It is remarkable that this algorithm is not built on top of some lower level "atomic" operation, e.g. compare-and-swap." This looks like it may work. Jonathan, h

Re: Concurrency: Does C* support a Happened-Before relation between processes' writes?

2011-06-24 Thread AJ
On 6/24/2011 2:27 PM, Jonathan Ellis wrote: Might be able to do it with http://en.wikipedia.org/wiki/Lamport%27s_bakery_algorithm. "It is remarkable that this algorithm is not built on top of some lower level "atomic" operation, e.g. compare-and-swap." I've been meaning to get back to reading t

Re: Concurrency: Does C* support a Happened-Before relation between processes' writes?

2011-06-24 Thread AJ
On 6/24/2011 2:09 PM, Jim Newsham wrote: On 6/24/2011 9:28 AM, Yang wrote: without a clear description of your pseudo-code, it's difficult to say whether it will work. but I think it can work fine as an election/agreement protocol, which you can use as a lock to some degree, but this requires

Re: Concurrency: Does C* support a Happened-Before relation between processes' writes?

2011-06-24 Thread Jonathan Ellis
Might be able to do it with http://en.wikipedia.org/wiki/Lamport%27s_bakery_algorithm. "It is remarkable that this algorithm is not built on top of some lower level "atomic" operation, e.g. compare-and-swap." On Fri, Jun 24, 2011 at 1:33 PM, AJ wrote: > Sorry, I know this is long-winded but I ju

Re: Concurrency: Does C* support a Happened-Before relation between processes' writes?

2011-06-24 Thread Jim Newsham
On 6/24/2011 9:28 AM, Yang wrote: without a clear description of your pseudo-code, it's difficult to say whether it will work. but I think it can work fine as an election/agreement protocol, which you can use as a lock to some degree, but this requires all the potential lock contenders to all

Re: Concurrency: Does C* support a Happened-Before relation between processes' writes?

2011-06-24 Thread Yang
by "possible node N", I mean possible clients that will ever try to do the locking On Fri, Jun 24, 2011 at 12:28 PM, Yang wrote: > without a clear description of your pseudo-code, it's difficult to say > whether it will work. > > but I think it can work fine as an election/agreement protocol, w

Re: Concurrency: Does C* support a Happened-Before relation between processes' writes?

2011-06-24 Thread Yang
without a clear description of your pseudo-code, it's difficult to say whether it will work. but I think it can work fine as an election/agreement protocol, which you can use as a lock to some degree, but this requires all the potential lock contenders to all participate, you can't grab a lock bef

Concurrency: Does C* support a Happened-Before relation between processes' writes?

2011-06-24 Thread AJ
Sorry, I know this is long-winded but I just want to make sure before I go through the trouble to implement this since it's not something that can be reliably tested and requires in-depth knowledge about C* internals. But, this ultimately deals with concurrency control so anyone interested in