Re: No Transactions: An Example

2011-07-28 Thread Jeremy Sevellec
Hi All, Making transaction is my actual preoccupation of the moment. My need is : - update data in column family #1 - insert data in column family #2 My need is to see thes opérations in a single transaction because the data is tightly coupled. I use zookeeper/cage to make distributed lock to

Re: No Transactions: An Example

2011-06-29 Thread AJ
On 6/22/2011 9:18 AM, Trevor Smith wrote: Right -- that's the part that I am more interested in fleshing out in this post. Here is one way. Use MVCC http://en.wikipedia.org/wiki/Multiversion_concurrency_control. A single global clean-up process would be acceptable since it's not a

Re: No Transactions: An Example

2011-06-23 Thread Trevor Smith
Domonic, Thank you for your answer. I enjoy how in your day to day work you are concerned with who has the monster. It must be a fun to read your productions logs (User[Shelly] received vampire). I looked into Cages and this does seem interesting. I need to do more reading to have a better take.

Re: No Transactions: An Example

2011-06-23 Thread Trevor Smith
AJ, Thanks for your input. I don't fully follow though how this would work with a bank scenario. Could you explain in more detail? Thanks. Trevor On Wed, Jun 22, 2011 at 6:34 PM, AJ a...@dude.podzone.net wrote: I think Sasha's idea is worth studying more. Here is a supporting read

Re: No Transactions: An Example

2011-06-23 Thread Les Hazlewood
Hi Dominic, Thanks so much for providing this information. I was unaware of Cages and this looks like it could be used effectively for certain things. This is because Cassandra uses the timestamps of columns that have been written during reconciliation to determine which should be persisted

Re: No Transactions: An Example

2011-06-23 Thread Ryan King
On Thu, Jun 23, 2011 at 2:05 PM, Les Hazlewood l...@katasoft.com wrote: Hi Dominic, Thanks so much for providing this information.  I was unaware of Cages and this looks like it could be used effectively for certain things. This is because Cassandra uses the timestamps of columns that have

Re: No Transactions: An Example

2011-06-23 Thread Les Hazlewood
Thanks for the pointer Ryan! Regards, Les

Re: No Transactions: An Example

2011-06-23 Thread AJ
On 6/23/2011 7:37 AM, Trevor Smith wrote: AJ, Thanks for your input. I don't fully follow though how this would work with a bank scenario. Could you explain in more detail? Thanks. Trevor I don't know yet. I'll be researching that. My working procedure is to figure out a way to handle

No Transactions: An Example

2011-06-22 Thread Trevor Smith
Hello, I was wondering if anyone had architecture thoughts of creating a simple bank account program that does not use transactions. I think creating an example project like this would be a good thing to have for a lot of the discussions that pop up about transactions and Cassandra (and

Re: No Transactions: An Example

2011-06-22 Thread Sasha Dolgy
I'd implement the concept of a bank account using counters in a counter column family. one row per account ... each column for transaction data and one column for the actual balance. just so long as you use whole numbers ... no one needs pennies anymore. -sd On Wed, Jun 22, 2011 at 4:18 PM,

Re: No Transactions: An Example

2011-06-22 Thread Trevor Smith
Sasha, How would you deal with a transfer between accounts in which only one half of the operation was successfully completed? Thank you. Trevor On Wed, Jun 22, 2011 at 10:23 AM, Sasha Dolgy sdo...@gmail.com wrote: I'd implement the concept of a bank account using counters in a counter

Re: No Transactions: An Example

2011-06-22 Thread Sasha Dolgy
I would still maintain a record of the transaction ... so that I can do analysis post to determine if/when problems occurred ... On Wed, Jun 22, 2011 at 4:31 PM, Trevor Smith tre...@knewton.com wrote: Sasha, How would you deal with a transfer between accounts in which only one half of the

Re: No Transactions: An Example

2011-06-22 Thread Trevor Smith
Right -- that's the part that I am more interested in fleshing out in this post. Must one have background jobs checking the integrity of all transactions at some time interval? This gets hairy pretty quick with bank transactions (one unrolled transaction could cause many others to become

Re: No Transactions: An Example

2011-06-22 Thread Dominic Williams
Hi Trevor, I hope to post on my practical experiences in this area soon - we rely heavily on complex serialized operations in FightMyMonster.com. Probably the most simple serialized operation we do is updating nugget balances when, for example, there has been a trade of monsters. Currently we

Re: No Transactions: An Example

2011-06-22 Thread AJ
I think Sasha's idea is worth studying more. Here is a supporting read referenced in the O'Reilly Cassandra book that talks about alternatives to 2-phase commit and synchronous transactions: http://www.eaipatterns.com/ramblings/18_starbucks.html If it can be done without locks and the