Can I use Cassandra to store objects?

My application works like this.

Database (Mysql) where there is a command. A command is an object (consists of fields containing many fields, such as ints ans string). There is a web service that interacts with the database and receives a command from db and performs some operation.

The way to store a command in db is to remove all fields and insert them into db.

Is it possible to use cassandra instead of mysql and save the command object?

+3
source share
1 answer

Why do you want to move away from your current solution, which is related to a relational database? I would not (believe it or not) recommend changing your data warehouse first.

, Apache Cassandra.

Cassandra, , :

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"
  },
}  

( ( ) Cassandra)

+2

Source: https://habr.com/ru/post/1744039/


All Articles