SlideShare a Scribd company logo
@thetweetofmatt
Matt Kennedy
DataStax
Cassandra 3.0
Windows Support
JSON
UDF
Role-based authz
Commitlog Compression
New Storage Engine
New Hints Architecture
Materialized Views
DTCS
Message Coalescing
3.0
Windows Support
DTCS
UDF
Role-based authz
Commitlog Compression
New Storage Engine
New Hints Architecture
Materialized Views
JSON
Message Coalescing
2.2 3.0(July) (Released November 9)
JSON
CREATE TABLE users (

id uuid PRIMARY KEY,

name text,

state text,

birth_date int

);
INSERT INTO users (id, name, state, birth_date)

VALUES(now(), 'Joe User', 'TX', 1982);
INSERT INTO users JSON

'{"id": "1a4f88e2-6dc8-4edd-9e16-a7ba9c941f8d",

"name": "Joe User",

"state": "TX",

"birth_date": 1982}';
Collections
CREATE TABLE example (

    id int PRIMARY KEY,

    tupleval tuple<int, text>,

    numbers set<int>,

    words list<text>

);
INSERT INTO example (id, tupleval, numbers, words)

VALUES (0, (1, 'foo'), {1, 2, 3, 6}, ['the', 'quick', 'brown', 'fox']);
INSERT INTO example JSON

'{"id": 0,

"tupleval": [1, "foo"],

"numbers": [1, 2, 3, 6],

"words": ["the", "quick", "brown", "fox"]}';
User-defined types
CREATE TYPE address (number int, street text);
CREATE TABLE users (

id int PRIMARY KEY,

street_address frozen<address>

);
INSERT INTO users (id, street_address)

VALUES (1, {number: 123, street: 'Cassandra Ave'});
INSERT INTO users JSON

'{"id": 1,

"street_address": {"number": 1,

"street": "Cassandra Ave"}}';
Deeper Nesting
CREATE TYPE address (

street text,

city text,

zip_code int,

phones set<text>

);
CREATE TABLE users (

id uuid PRIMARY KEY,

name text,

addresses map<text, frozen<address>>

);
Deeper Nesting
INSERT INTO users JSON
'{"id": "0514e410-2a9f-11e5-a2cb-0800200c9a66",
"name": "jellis",
"addresses": {"home": {"street": "9920 Cassandra Ave",
"city": "Austin",
"zip_code": 78700,
"phones": ["1238614789"]}}}';
Role-based Authorization
CREATE ROLE accounting;
GRANT all ON invoices TO accounting;

GRANT select ON expenses TO accounting;

GRANT select ON payroll TO accounting;
GRANT accounting TO josie;

GRANT accounting TO jay;
User-defined Functions (UDF)
CREATE FUNCTION my_sin (input double)

RETURNS double LANGUAGE java

AS ’

return input == null

? null

: Double.valueOf(Math.sin(input.doubleValue()));

’;
SELECT key, my_sin(value) FROM my_table WHERE key IN (1, 2, 3);
UDF Aggregation
CREATE AGGREGATE avg (int)

SFUNC avgState

STYPE tuple<long, int>

FINALFUNC avgFinal;
CREATE FUNCTION avgState (state frozen<tuple<bigint, int>>, i int)

RETURNS frozen<tuple<bigint, int>>, int

LANGUAGE JAVA AS ’

// (state[0] + i, state[1] + 1)

state.setLong(0, state.getLong(0) + i.intValue());

state.setInt(1, state.getInt(1) + 1);

return state;

’;
CREATE FUNCTION avgFinal (state frozen<tuple<bigint, int>>)

RETURNS double

LANGUAGE JAVA AS ’

double r = state.getLong(0) / state.getInt(1);

return Double.valueOf(r);

’;
Commitlog Compression
2.2
2.1
Operations/s
Time
DateTieredCompactionStrategyReads/s
DTCS
STCS
LCS
2.5TB
DateTieredCompactionStrategyWrites/s
DTCS
STCS
LCS
3.0 Features
New Storage Engine
Why???
Pre 3.0
• Clustering keys are repeated for each cell
• Timestamps are repeated in each cell
• TTLS are.. you get the idea
• Rows are a bolted on construct, only
known by a convention
• Lots of wasted space
• Lots of repetition
Storage in 3.0
• Rows are a first class entity
• Timestamps and TTLS can be
stored on the Row
• Clustering keys are not repeated
• Conversion to iterators for
memory efficiency
New Storage Engine
Workloads
Bytes
Pre 3.0
• Clustering keys are repeated for each cell
• Timestamps are repeated in each cell
• TTLS are.. you get the idea
• Rows are a bolted on construct, only known by a
convention
• Lots of wasted space
• Lots of repetition
Storage Model - Logical View
2005:12:1:10
-5.6
2005:12:1:9
-5.1
2005:12:1:8
-4.9
10010:99999
10010:99999
10010:99999
wsid hour temperature
2005:12:1:7
-5.3
10010:99999
SELECT wsid, hour, temperature

FROM raw_weather_data

WHERE wsid=‘10010:99999’

AND year = 2005 AND month = 12 AND day = 1;
2005:12:1:10
-5.6 -5.3-4.9-5.1
Storage Model - Disk Layout
2005:12:1:9 2005:12:1:8
10010:99999
2005:12:1:7
SELECT wsid, hour, temperature

FROM raw_weather_data

WHERE wsid=‘10010:99999’

AND year = 2005 AND month = 12 AND day = 1;
TTL
Timestamp
TTL
Timestamp
TTL
Timestamp
TTL
Timestamp
Repeated column values
Repeated TTL and Timestamps
Storage in 3.0
• Rows are a first class entity
• Timestamps and TTLS can be stored on the Row
• Clustering keys are not repeated
• Conversion to iterators for memory efficiency
New Storage Engine
Workloads
Bytes
Hinted Handoff Improvements
client
p1
p1
p1
X
Hinted Handoff Improvements
client
p1
p1
p1
Hint
Hinted Handoff Improvements
client
p1
p1
p1
Handoff
SSTable-based Hints
Hint
Compacted
Tombstone
Memtable
Commitlog
SSTableCommitlog
SSTable
Memtable
File-based Hints
Hint
.168.101
Hint
Hint
Hint
Hint
Hint
Hint
Hint
.168.104
Hint
Hint
Hint
Hint
Hint
Hint
Hint
Hint
.168.112
Hint
Hint
Hint
Hint
Hint
Hint
Hint
Hint
File-based Hints
.168.104
Hint
Hint
Hint
Hint
Hint
Hint
Hint
Hint
.168.112
Hint
Hint
Hint
Hint
Hint
Hint
Hint
Hint
3.0
2.2
2.2 Hints vs 3.0Operations/s
Time
Materialized Views
CREATE TABLE songs (

  id uuid PRIMARY KEY,

  title text,

  album text,

  artist text

);
CREATE MATERIALIZED VIEW songs_by_album AS

SELECT * FROM songs

WHERE album IS NOT NULL

PRIMARY KEY (album, id);
SELECT * FROM songs_by_album

WHERE album = ‘Tres Hombres’;
Indexes
CREATE TABLE songs (

  id uuid PRIMARY KEY,

  title text,

  album text,

  artist text

);
CREATE INDEX songs_by_album on songs(album);
SELECT * FROM songs

WHERE album = ‘Tres Hombres’;
Local Indexes
client
title artist album
La
Grange
ZZ Top
Tres
Hombre
s
title artist album
Outside...
Back Door
Slam
Roll Away
title artist album
Waitin... ZZ Top
Tres
Hombres
Materialized Views
client
album id
Tres
Hombres
a3e64f8f
Tres
Hombres
8a172618
album id
Roll Away 2b09185b
Stress: raw vs 1 MV vs 5 MV
Operations/s
Time
raw
1 MV
5 MV
mvbench, 4 denormalizations
MV
Manual
Operations/s
Time
Writing Materialized Views
Beyond 3.0
JBOD-aware vnodes
disk1 disk2 disk3 disk4
JBOD-aware vnodes
disk1 disk2 disk3 disk4
3.x Development Process
3.0 releases
3.0 rc1: Out now
3.0 GA
November
December
3.1
3.2
January
February
3.3
3.0 releases
3.0 rc1: Out now
3.0 GA
October
December
3.1
3.0.1
3.2
3.0.2
January
February
3.3
3.0.3
Compatibility
3.0
3.1
3.2
DataStax Training for Apache Cassandra™

More Related Content

PDF
Investigation of Transactions in Cassandra
datastaxjp
 
PPTX
Investigation of Transactions in Cassandra
Ian Chen
 
PDF
Data in Motion: Streaming Static Data Efficiently 2
Martin Zapletal
 
DOCX
Custom faultpolicies
XAVIERCONSULTANTS
 
PDF
Cassandra summit 2013 - DataStax Java Driver Unleashed!
Michaël Figuière
 
PDF
What's new in Cassandra 2.0
iamaleksey
 
PDF
Cassandra Summit 2015
jbellis
 
PDF
Cassandra summit keynote 2014
jbellis
 
Investigation of Transactions in Cassandra
datastaxjp
 
Investigation of Transactions in Cassandra
Ian Chen
 
Data in Motion: Streaming Static Data Efficiently 2
Martin Zapletal
 
Custom faultpolicies
XAVIERCONSULTANTS
 
Cassandra summit 2013 - DataStax Java Driver Unleashed!
Michaël Figuière
 
What's new in Cassandra 2.0
iamaleksey
 
Cassandra Summit 2015
jbellis
 
Cassandra summit keynote 2014
jbellis
 

What's hot (18)

PDF
MySQL 8.0 Operational Changes
Dave Stokes
 
PDF
2018 02-22 React, Redux & Building Applications that Scale | Redux
Codifly
 
PDF
Cassandra Summit 2013 Keynote
jbellis
 
PDF
Store and Process Big Data with Hadoop and Cassandra
Deependra Ariyadewa
 
PDF
Cassandra Community Webinar | Become a Super Modeler
DataStax
 
PPTX
Cassandra 2.2 & 3.0
Victor Coustenoble
 
PDF
React, Redux and es6/7
Dongho Cho
 
PDF
Bulk Loading Data into Cassandra
DataStax
 
PPTX
Code refactoring of existing AutoTest to PageObject pattern
Anton Bogdan
 
PPTX
Database administration commands
Varsha Ajith
 
PPTX
Using Change Streams to Keep Up with Your Data
MongoDB
 
ODP
Buenos Aires Drools Expert Presentation
Mark Proctor
 
DOCX
Enable archivelod mode in oracle rac12cR1 with asm location
Debasish Nayak
 
PPTX
Rxjs marble-testing
Christoffer Noring
 
PDF
Cassandra at BrightTag
DataStax Academy
 
PDF
CFCouchbase 2.0 and N1QL
Aaron Benton
 
PDF
Cassandra 2.0 better, faster, stronger
Patrick McFadin
 
PDF
Cassandra 2.1
jbellis
 
MySQL 8.0 Operational Changes
Dave Stokes
 
2018 02-22 React, Redux & Building Applications that Scale | Redux
Codifly
 
Cassandra Summit 2013 Keynote
jbellis
 
Store and Process Big Data with Hadoop and Cassandra
Deependra Ariyadewa
 
Cassandra Community Webinar | Become a Super Modeler
DataStax
 
Cassandra 2.2 & 3.0
Victor Coustenoble
 
React, Redux and es6/7
Dongho Cho
 
Bulk Loading Data into Cassandra
DataStax
 
Code refactoring of existing AutoTest to PageObject pattern
Anton Bogdan
 
Database administration commands
Varsha Ajith
 
Using Change Streams to Keep Up with Your Data
MongoDB
 
Buenos Aires Drools Expert Presentation
Mark Proctor
 
Enable archivelod mode in oracle rac12cR1 with asm location
Debasish Nayak
 
Rxjs marble-testing
Christoffer Noring
 
Cassandra at BrightTag
DataStax Academy
 
CFCouchbase 2.0 and N1QL
Aaron Benton
 
Cassandra 2.0 better, faster, stronger
Patrick McFadin
 
Cassandra 2.1
jbellis
 
Ad

Similar to Cassandra v3.0 at Rakuten meet-up on 12/2/2015 (20)

PPT
IBM Informix dynamic server 11 10 Cheetah Sql Features
Keshav Murthy
 
PPT
What's New for Developers in SQL Server 2008?
ukdpe
 
PPT
SQL Server 2008 Overview
Eric Nelson
 
PPTX
New Features of SQL Server 2016
Mir Mahmood
 
PDF
The Ring programming language version 1.10 book - Part 19 of 212
Mahmoud Samir Fayed
 
PDF
Ss dotnetcodexmpl
rpravi12
 
PDF
Better than you think: Handling JSON data in ClickHouse
Altinity Ltd
 
PDF
All About JSON and ClickHouse - Tips, Tricks and New Features-2022-07-26-FINA...
Altinity Ltd
 
PPTX
SQL Server Select Topics
Jay Coskey
 
PPTX
Java script
Shagufta shaheen
 
PPTX
Getting started with Elasticsearch and .NET
Tomas Jansson
 
PDF
C++ practical
Rahul juneja
 
PDF
Going Native: Leveraging the New JSON Native Datatype in Oracle 21c
Jim Czuprynski
 
PDF
Introduction to Dating Modeling for Cassandra
DataStax Academy
 
DOCX
please code in c#- please note that im a complete beginner- northwind.docx
AustinaGRPaigey
 
PPT
ABAP Programming Overview
sapdocs. info
 
PPT
chapter-1abapprogrammingoverview-091205081953-phpapp01
tabish
 
PPT
Chapter 1 Abap Programming Overview
Ashish Kumar
 
PPT
Abapprogrammingoverview 090715081305-phpapp02
tabish
 
PPT
Abapprogrammingoverview 090715081305-phpapp02
wingsrai
 
IBM Informix dynamic server 11 10 Cheetah Sql Features
Keshav Murthy
 
What's New for Developers in SQL Server 2008?
ukdpe
 
SQL Server 2008 Overview
Eric Nelson
 
New Features of SQL Server 2016
Mir Mahmood
 
The Ring programming language version 1.10 book - Part 19 of 212
Mahmoud Samir Fayed
 
Ss dotnetcodexmpl
rpravi12
 
Better than you think: Handling JSON data in ClickHouse
Altinity Ltd
 
All About JSON and ClickHouse - Tips, Tricks and New Features-2022-07-26-FINA...
Altinity Ltd
 
SQL Server Select Topics
Jay Coskey
 
Java script
Shagufta shaheen
 
Getting started with Elasticsearch and .NET
Tomas Jansson
 
C++ practical
Rahul juneja
 
Going Native: Leveraging the New JSON Native Datatype in Oracle 21c
Jim Czuprynski
 
Introduction to Dating Modeling for Cassandra
DataStax Academy
 
please code in c#- please note that im a complete beginner- northwind.docx
AustinaGRPaigey
 
ABAP Programming Overview
sapdocs. info
 
chapter-1abapprogrammingoverview-091205081953-phpapp01
tabish
 
Chapter 1 Abap Programming Overview
Ashish Kumar
 
Abapprogrammingoverview 090715081305-phpapp02
tabish
 
Abapprogrammingoverview 090715081305-phpapp02
wingsrai
 
Ad

More from datastaxjp (13)

PDF
Db tech showcase 2016
datastaxjp
 
PPTX
Cassandra Meetup Tokyo, 2016 Spring
datastaxjp
 
PPTX
Cassandra Meetup Tokyo, 2016 Spring 2
datastaxjp
 
PDF
検索エンジンPatheeがAzureとCassandraをどう利用しているのか
datastaxjp
 
PDF
(LT)Spark and Cassandra
datastaxjp
 
PDF
SparkとCassandraの美味しい関係
datastaxjp
 
PDF
Cassandra summit 2015 レポート
datastaxjp
 
PDF
Cassandra Meetup Tokyo, 2015 Summer
datastaxjp
 
PDF
Cassandra and Spark
datastaxjp
 
PDF
[Cassandra summit Tokyo, 2015] Apache Cassandra日本人コミッターが伝える、"Apache Cassandra...
datastaxjp
 
PDF
[Cassandra summit Tokyo, 2015] Cassandra 2015 最新情報 by ジョナサン・エリス(Jonathan Ellis)
datastaxjp
 
PDF
[db tech showcase Tokyo 2015] E35: Web, IoT, モバイル時代のデータベース、Apache Cassandraを学ぼう
datastaxjp
 
PDF
[db tech showcase Tokyo 2015] A27: RDBエンジニアの為のNOSQL, 今どうしてNOSQLなのか?
datastaxjp
 
Db tech showcase 2016
datastaxjp
 
Cassandra Meetup Tokyo, 2016 Spring
datastaxjp
 
Cassandra Meetup Tokyo, 2016 Spring 2
datastaxjp
 
検索エンジンPatheeがAzureとCassandraをどう利用しているのか
datastaxjp
 
(LT)Spark and Cassandra
datastaxjp
 
SparkとCassandraの美味しい関係
datastaxjp
 
Cassandra summit 2015 レポート
datastaxjp
 
Cassandra Meetup Tokyo, 2015 Summer
datastaxjp
 
Cassandra and Spark
datastaxjp
 
[Cassandra summit Tokyo, 2015] Apache Cassandra日本人コミッターが伝える、"Apache Cassandra...
datastaxjp
 
[Cassandra summit Tokyo, 2015] Cassandra 2015 最新情報 by ジョナサン・エリス(Jonathan Ellis)
datastaxjp
 
[db tech showcase Tokyo 2015] E35: Web, IoT, モバイル時代のデータベース、Apache Cassandraを学ぼう
datastaxjp
 
[db tech showcase Tokyo 2015] A27: RDBエンジニアの為のNOSQL, 今どうしてNOSQLなのか?
datastaxjp
 

Recently uploaded (20)

PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 

Cassandra v3.0 at Rakuten meet-up on 12/2/2015