Coding Serbia 2015 conference talk on breaking free from relational databases. This talk covers the reasons why RDBMS is having issues with our current needs and introduces Cassandra as a solution to certain use-cases. There are some details of our learning process and typical failures people make when making this transition.
2. Agenda
What’s wrong with RDBMS
What we need today
Introduction to Cassandra
Use-cases and benefits
Learning process and common mistakes
Migrating to Cassandra
3. What’s wrong with RDBMS
Reliable and we understand it
Been around for ages
Development and administration tools
Worked great for few decades
4. What’s wrong with RDBMS
Requires expensive server hardware
Doesn’t scale
Limited fault tolerance
Can’t handle big amounts of data
Architectural limitations
9. What we need today
90% of world's data generated over last two years
Data impacts business
Systems that can learn and adopt
Personalized experience
We store everything
10. What we need today
Availability
Scalability
Fault tolerance
Performance
23. Learning process
CQL looks like SQL
CREATE TABLE songs (
id uuid PRIMARY KEY,
title text,
album text,
artist text,
data blob
);
CREATE TABLE playlists (
id uuid,
song_order int,
song_id uuid,
title text,
album text,
artist text,
PRIMARY KEY (id, song_order )
);
24. Learning process
CQL looks like SQL
CREATE TABLE songs (
id uuid PRIMARY KEY,
title text,
album text,
artist text,
data blob
);
CREATE TABLE playlists (
id uuid,
song_order int,
song_id uuid,
title text,
album text,
artist text,
PRIMARY KEY (id, song_order )
);
33. Migrating from RDBMS
Understand how data is queried
Conceptual model is reusable
Run in parallel (leverage MQ)
Start developing with 3 nodes
Leverage parallel execution
You cannot beat laws of physics
34. MongoDB to Cassandra
MongoDB uses “relational” model
MongoDB is more flexible for R&D
Don’t measure performance of single nodes
Don’t use secondary indexes
Don’t use MongoDB
35. When not to use Cassandra
When you don’t need scalability
When you have a lot of updates
When you need query flexibility
When you don’t know what you need
36. Action points
Data modeling is query based
Understand physical data layout
Respect eventual consistency
Have fun