How to quickly install and start experimenting with Cassandra. Part 2
This is a continuation of the article "How to quickly install and start experimenting with Cassandra" , published on the hub.
What you cannot do in Cassandra, but would like to:
For Rails there is a cassandra_object analogue of active_record. It is interesting in that it builds the index on some fields, however, the configuration file will have to be edited manually. I talked with the developers, there are plans to do this automatically.
The advice is still like this, if you are planning to use Cassandra, test absolutely everything, even the simplest queries.
After each test, you have to clean the database, this can be done like this:
By the way, this command does not guarantee complete clearing of all records, but for tests this is usually suitable.
There are no more well-known gems (cassandra, cassandra_object). Maybe you will be useful for my work:
What you cannot do in Cassandra, but would like to:
- Indexing, and searching for ... generally for some reason. Indexing will have to be done manually. The Lucandra - Lucene project for Cassandra can help in part
- You cannot quickly (in O (1)) find out the total number of records
- Don’t even think about transactions
- You can forget about map reduce, at least in the next versions
- There are no table delimitations by users (this is not in the current stable version 0.51, in the future it will be)
- There are difficulties in adding new databases, for this you will have to stop Cassandra (they promise to fix it in the next versions)
- Only simple queries, for example, to get the 10 most popular blogs, you have to work hard
- At irc, I was highly discouraged from storing pictures in Cassandra
Rails
For Rails there is a cassandra_object analogue of active_record. It is interesting in that it builds the index on some fields, however, the configuration file will have to be edited manually. I talked with the developers, there are plans to do this automatically.
Tests
The advice is still like this, if you are planning to use Cassandra, test absolutely everything, even the simplest queries.
After each test, you have to clean the database, this can be done like this:
class ActiveSupport :: TestCase def teardown CassandraObject :: Base.connection.clear_keyspace! end end
By the way, this command does not guarantee complete clearing of all records, but for tests this is usually suitable.
There are no more well-known gems (cassandra, cassandra_object). Maybe you will be useful for my work:
- attribute_normalizer for Cassandra is a fork of attribute_normalizer for active_record. Tests are still being written, but the fork is working
- Cassandra session store (not yet published)
- Simple authorization system. This is a redesigned clearence plugin (not yet published)