Hi have an existing rails 4 app which is using a MySQL database.
I now need to add code that creates dynamically a new table for every object and its attributes.
I decided to use a No SQL solution for this. Initially I wanted to use Mongo DB since I was familair with this. However, my company supports only Cassandra/redis/solr. So I have to pick one of these.
I chose Cassandra but Im not finding any tutorials or examples on how to use it with an existing rails app with a MySQL DB.
I found this ORM for rails-Cassandra but no idea how to make it work with an existing Active record - mysql system.
Any ideas would be very appreciated.
Apologize this post has no code. But I couldnt find any answers for this issue on SO so please excuse if any mistakes.
thanks
ActiveRecordandCequelwill be independent.As shown in their docs you extend a model's functionality by including the
Cequel::Recordmodule.In order to use it in rails you (obviously) need to add the proper gem in your
Gemfileand create the configuration for the project
After that, you will have a
config/cequel.ymlfrom where you will define your settings (as you did inconfig/database.ymlfor your MySQL)MySQL models will still use the
ActiveRecordwhile
Cassandraones will use theCequel