Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cassandra for storing payment information

Tags:

cassandra

I am trying to build a highly available very high volume shopping cart application. The application will have a volume so high that I am considering using cassandra instead of mysql for the database.

Now, in a shopping cart system, most database actions have to be 100% consistent, while others do not have to be.

Example of 100% consistent action: Saving the payment confirmation. Saving the purchased items list.

Example of things which do not require 100% consistent action: Saving the address of the customer (If at the time of payment, no address is saved in the database, assume that it was lost and ask the customer again). Other similar things.

Now, if I am running a server cluster in the same region (Amazon EC2), are there any major roadblocks to performing all transactions as a maximal consistent transaction. Would that provide identical reliability than mySQl Relational database. Remember, we are dealing with financial transactions here.

Is my data generally "safe" in cassandra. By that I mean complete unexpected power failure, random disc failure, etc, etc.

like image 457
Anon21 Avatar asked Oct 20 '11 19:10

Anon21


1 Answers

Specific to your questions about availability and EC2 ... As Theodore wrote, the consistency level in Cassandra will dictate how "safe" the data is. The problems you'll face is how to ensure the data is getting to Cassandra, fulfilling your Transaction goals and is being saved appropriately.

There are some good threads about transactions and solving this problem on the Apache Cassandra User's mailing list.

Cassandra on it's own is not suitable for transactions:

  • Cassandra - transaction support

To get around this, you need "something" that can leverage Cassandra as a data store that manages the transactions above the data tier.

  • how to integrate cassandra with zookeeper to support transactions

  • Cages: http://code.google.com/p/cages/

  • 'Locking and transactions over Cassandra using Cages': http://ria101.wordpress.com/2010/05/12/locking-and-transactions-over-cassandra-using-cages/
    • There is a section called "Transactions for Cassandra" for more information

Summary ... You cannot guarantee financial transactions with Cassandra alone

like image 93
sdolgy Avatar answered Oct 04 '22 01:10

sdolgy