8. Hardware failures
can and will occur!
Cassandra handles failures.
From single node to whole data center.
From client to server.
8
9. The complicated part
when learning Cassandra,
is to understand
Cassandra’s simplicity
9
10. Keep it simple
all nodes are equal
master-less architecture
no name nodes
no SPOF (single point of failure)
no read before modify
(prevent race conditions)
10
11. Keep it running
No need to take cluster down … e.g.
during maintenance
during software update
Rolling restart is your friend
11
13. Cassandra
Highly scalable
runs with a few nodes
up to 1000+ nodes cluster!
Linear scalability (proven!)
Multi datacenter aware (world-wide!)
No SPOF
13
50. CQL collection
types
list < foo >
set < foo >
map < foo , bar >
Since C* 2.1 collections can contain
any type - even other collections.
50
51. CQL composite
types
user types (C* 2.1)
are composite types with named fields
tuple types (C* 2.1)
are unstructured lists of values
51
52. CQL / user types
CREATE TYPE address (
street text,
zip int,
city text);
CREATE TABLE users (
username text,
addresses map<text, address>,
...
52
53. Cassandra
Data Modeling
Access by key
no access by arbitrary WHERE clause
Duplicate data (it’s ok!)
Aggregate data
Build application maintained indexes
53
63. Stress test?
Cassandra 2.1 comes with improved
stress tool
Simulate read+write workload
Uses configurable data
Works against older C* versions, too
63
64. DataStax APLv2
Open Source Drivers
for Java
for Python
for C#
for Scala / Spark
https://github.com/datastax/
or http://www.datastax.com/download
64
65. Native protocol
C*’s own net protocol for clients
Request multiplexing
Schema change notifications
Cluster change notifications
65
72. Cluster experience
Remember: A single Cassandra
clusters works over multiple data
centers all over the world
„Desaster proven“
Hurricanes
Amazon DC outages
72
81. C* 3.0 UDFs
Users create functions using
CREATE FUNCTION …
LANGUAGE …
AS …
Java, JavaScript, Scala, Groovy,
JRuby, Jython
Functions work on all nodes
81
82. C* 3.0 UDFs
Example
CREATE FUNCTION sin(input double)
RETURNS double
LANGUAGE javascript
AS 'Math.sin(input)';
82
This is JavaScript!
83. UDFs for what?
Own aggregation code - e.g.
SELECT sum(value) FROM table
WHERE …;
Functional indexes - e.g.
CREATE INDEX idx
ON table ( myFunction(colname) );
83
Targeted for C* 3.0
84. Thanks
for your attention
Download Apache Cassandra at
http://cassandra.apache.org/
Robert Stupp
@snazy
snazy@snazy.de
de.slideshare.net/RobertStupp
84