I'm trying to learn how to map the entities/actors/objects/things in my application for storage in Cassandra. There was a great tutorial for Redis on modeling Twitter data and typical access patterns called Retwis [1]. I've found a couple of examples for Cassandra.
How did you start to gain an intuition for Cassandra's data model?
[1] http://retwis.antirez.com/
Because Redis stores voluminous data in memory, its transactional response times are much faster than Cassandra that persists data to disk by performing traditional read-write transactions, albeit much quicker than a conventional RDBMS.
Cassandra data model contains keyspaces, tables, and columns. A keyspace is the container of all data in Cassandra. Replication is specified at the keyspace level. Tables and columns contain the key value data in Cassandra. Every table should have a primary key, which can be a composite primary key.
http://github.com/ericflo/twissandra is a twitter clone in the same vein as retwis, originally for 0.3 and now being updated for 0.6. Catch erifclo in #cassandra on irc if you have questions.
you should start with WTF is a SuperColumn to understand the data model.
up and running with cassandra is also a very good starting tutorial and it has example schemas for a blog and for twitter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With