tags:

views:

177

answers:

1

Hi,

My application works like this.

A database(Mysql) where there is a command. The command is an object(consists of fields many fields like ints ans strings). There is a webservice which interact with the database and get the command from the db and performs some operation.

The way how I am storing the command into db is by stripping all the fields and inserting them in to the db.

Can I use cassandra in place of mysql and store the command object?

+2  A: 

Why do you want to move away from your current solution which involes a relational database? I wouldn't (believe it or not) recommend to change your datastore premature.

If your are experience problems and want to replace your relational database, then I would recommend to investigate Apache Cassandra.

If you find Cassandra interesting I would suggest a data model that looks something like this:

Commands = { // this is a ColumnFamily (CF)
     commandObject1: { // this is the key to this Row inside the CF
          // now we have an infinite # of columns in this row
          field1: "value1",  
          field2: "value2",
          field3: "value3"
     }, // end row
     commandObject2: {   // this is the key to another row in the CF
          // now we have another infinite # of columns in this row
          field1: "value1",
          field2: "value2",
          field3: "value3"
          field4: "value4",
          field5: "value5"
  },
}  

(thanks Arin (and his excellent blog post) for the Cassandra data model notation)

Schildmeijer