Community is Just as Important as Code by Andrea Goulet
2015 03-31 dom-code_cassandra
1. Storing Data the Cassandra Way
Freek van Polen
“Simplicity is the ultimate sophistication.”
-Leonardo Da Vinci
2. About Me
● Cognitive Artificial Intelligence @ UU
● Almende:
– Researcher, self-organization, wireless sensor
networks
● Sense:
– First employee, developer, backend, team leader
3. Goal of this Talk
● Not to tell you to use Cassandra for everything
4. Goal of this Talk
● Not to tell you to use Cassandra for everything
● Not to go into all gory details of Cassandra
5. Goal of this Talk
● Not to tell you to use Cassandra for everything
● Not to go into all gory details of Cassandra
● Not to show off my drawing skills
6. Goal of this Talk
● Introduce some database theory
7. Goal of this Talk
● Introduce some database theory
● Make you enthusiastic about Cassandra
8. Goal of this Talk
● Introduce some database theory
● Make you enthusiastic about Cassandra
Use the right tool for the job!
43. Cassandra Data Model
● Primary Key #1:
– Row key
– Unit of partitioning
● Primary Key #2:
– Column key
– Order within row
– Order is preserved on disk!
45. Distributed Concurrent Writes
● Last write wins
● Paxos
● Treat data as
immutable
from: https://aphyr.com/posts/294-call-me-maybe-cassandra
46. Distributed Concurrent Writes
● Cassandra trades
consistency for
availability, partition
tolerance, and super
easy administration...
● This is not for all use
cases
from: https://aphyr.com/posts/294-call-me-maybe-cassandra
47. THE use case: time series data
CREATE TABLE sensor_data (
sensor_id text,
time timestamp,
value text,
PRIMARY KEY (sensor_id, time)
);