55
It's about time : Deep dive into event store using Apache Cassandra by Nikunj akkar

Deep dive into event store using Apache Cassandra

Embed Size (px)

Citation preview

Page 1: Deep dive into event store using Apache Cassandra

It's about time : Deep dive into event store using

Apache Cassandra

by Nikunj Thakkar

Page 2: Deep dive into event store using Apache Cassandra

Agenda

● What is Big Data?● So far in AJM Bigdata

Series● Where it is? Am I using

it?

Big Data at-a-glanceIntroduction to

Apache Cassandra

● What, When and Why of Cassandra

● Protocol, Architecture, Queries and Evrything else

● Interesting Use-cases● Demo

Page 3: Deep dive into event store using Apache Cassandra

Big Data at-a-glance

Page 4: Deep dive into event store using Apache Cassandra

What is BigData?

Page 5: Deep dive into event store using Apache Cassandra
Page 6: Deep dive into event store using Apache Cassandra

What is Big Data?Large amount of data

that can only be processed during

night hours

Page 7: Deep dive into event store using Apache Cassandra

क्यया कममी रह गयमीथमी ममेरमे जजॉब डडिडसकस रप्शन मम?

What is Big Data?

Page 8: Deep dive into event store using Apache Cassandra

So far in AJM Big Data

Series

Page 9: Deep dive into event store using Apache Cassandra

4 V's OfBig Data

Page 10: Deep dive into event store using Apache Cassandra

4 V's OfBig Data

Volume

Variety

VelocityVeracity

Page 11: Deep dive into event store using Apache Cassandra

CAPTheoram

Page 12: Deep dive into event store using Apache Cassandra

CAPTheoram

Consistency

Availability

Partition tolerance

Page 13: Deep dive into event store using Apache Cassandra

Family of

NOSQLDATABASES

Page 14: Deep dive into event store using Apache Cassandra

Family of

NOSQLDATABASES

Wide Column Store / Column Families

Document Store

Wide Column Store / Column FamiliesWide Column Store / Column Families

Key Value / Tuple Store

Graph Databases

Multimodel Databases

Object Databases

Grid & Cloud Database Solutions

Object Databases

XML Databases

Multidimensional Databases

Multivalue Databases

Page 15: Deep dive into event store using Apache Cassandra

Big Data: Where it is?

Page 16: Deep dive into event store using Apache Cassandra

Big Data: Am I using it?

Page 17: Deep dive into event store using Apache Cassandra

Targeted marketingPublic sector

Big Data: Am I using it?

Health careSocial media and web data

Global personal location tracking

Social media and web dataSocial media and web data

Automated device generated data

Page 18: Deep dive into event store using Apache Cassandra

Introduction to

Apache Cassandra

Page 19: Deep dive into event store using Apache Cassandra

Hey wait,First tell me about events and event

stores.

Page 20: Deep dive into event store using Apache Cassandra

What is Apache Cassandra?

Page 21: Deep dive into event store using Apache Cassandra

Top level Apache Project

Page 22: Deep dive into event store using Apache Cassandra

Born at Facebook

Page 23: Deep dive into event store using Apache Cassandra

Google's Big Table + Amazone's Dynamo = Cassandra

Page 24: Deep dive into event store using Apache Cassandra

Demo Time

Page 25: Deep dive into event store using Apache Cassandra
Page 26: Deep dive into event store using Apache Cassandra

Network Topology – Multiple DC

Page 27: Deep dive into event store using Apache Cassandra

Why Apache Cassandra?

Page 28: Deep dive into event store using Apache Cassandra

Elastic scalability

Page 29: Deep dive into event store using Apache Cassandra

Always on architecture -

No single point of failure

Page 30: Deep dive into event store using Apache Cassandra

Fast linear-scale performance

Page 31: Deep dive into event store using Apache Cassandra

Flexible data storage

Page 32: Deep dive into event store using Apache Cassandra

Easy data distribution

Page 33: Deep dive into event store using Apache Cassandra

Operational simplicity

Page 34: Deep dive into event store using Apache Cassandra

Transaction support

Page 35: Deep dive into event store using Apache Cassandra

Apache Cassandra: When to use?

Page 36: Deep dive into event store using Apache Cassandra
Page 37: Deep dive into event store using Apache Cassandra

Just kidding.... We will cover this part in use cases. :) :)

Page 38: Deep dive into event store using Apache Cassandra

Apache Cassandra: Interesting Facts

Page 39: Deep dive into event store using Apache Cassandra

Apache Cassandra: Interesting

Facts

Protocol

Page 40: Deep dive into event store using Apache Cassandra

Apache Cassandra: Interesting

Facts

Protocol

Thriftvs

CQL Binary Protocol

Page 41: Deep dive into event store using Apache Cassandra

Apache Cassandra: Interesting

Facts

Architecture

Page 42: Deep dive into event store using Apache Cassandra

Apache Cassandra: Interesting

Facts

Architecture

Key structures➔ Node➔ Data Center➔ Cluster➔ Commit Log➔ Table➔ SSTable

Page 43: Deep dive into event store using Apache Cassandra

Apache Cassandra: Interesting

Facts

Architecture

Key components

Page 44: Deep dive into event store using Apache Cassandra

Apache Cassandra: Interesting

Facts

Architecture

Key components➔ Gossip➔ Partitioner➔ Replication factor➔ Replica placement

strategy➔ Snitch

Page 45: Deep dive into event store using Apache Cassandra

Apache Cassandra: Interesting

Facts

Cassandra Query Language

Page 46: Deep dive into event store using Apache Cassandra

Apache Cassandra: Interesting

Facts

Cassandra Query Language

➔ CRUD➔ Data Modeling➔ Indexing

Page 47: Deep dive into event store using Apache Cassandra

Apache Cassandra@ Disqus

Page 48: Deep dive into event store using Apache Cassandra

Apache Cassandra@ Disqus

➔ Disqus - Disqus is a discussion platform for the web. It connects publishers with users and allow them to have a public discourse in a medium that allows communication across the web.

Page 49: Deep dive into event store using Apache Cassandra

Apache Cassandra@ Disqus

➔ Disqus uses Cassandra in a number of different places. Mainly in the product; it’s used for content recommendation and also a little bit of advertising. Let’s say you’re on that article reading about the war in Syria and you notice that there’s another interesting article relating to what the British PMs have released as a public statement relating to whether or not it’s legal to go to war, and maybe you’re interested in reading that response. What Cassandra does is it powers the analytics and content engine behind how disqus recommends content.

Page 50: Deep dive into event store using Apache Cassandra

Apache Cassandra@ Disqus

➔ Main cluster - 24 nodes➔ CPU - 6-core Xeons 3Ghz – Biggest – Because

turning out to be a small bottleneck at times➔ 24GB RAM – Per node – 8 GB Heap Size➔ 32 or 48GBs RAM wasn't helping much➔ it’s handling our load of about 30,000 reads a second

Page 51: Deep dive into event store using Apache Cassandra

Apache Cassandra@ Many other companies

Page 52: Deep dive into event store using Apache Cassandra
Page 53: Deep dive into event store using Apache Cassandra

Thank you :)

Page 54: Deep dive into event store using Apache Cassandra

Resources for Material

● http://smartdatacollective.com/bernardmarr/277731/big-data-25-facts-everyone-needs-know

● http://blog.gramener.com/1984/indian-elections-2014-big-data-for-billion-people

● http://indiaspora.org/blog/indian-elections-2014-big-data-for-billion-people/

● http://www.slideshare.net/BernardMarr/140228-big-data-volume-velocity-variety-varacity-value

● http://www.datastax.com/documentation/cassandra/2.1/cassandra/gettingStartedCassandraIntro.html

● http://planetcassandra.org/

● http://planetcassandra.org/blog/disqus-discusses-migration-from-redis-to-cassandra-for-horizontal-scalability/

● http://wiki.apache.org/cassandra/

Page 55: Deep dive into event store using Apache Cassandra

Resources for Graphics● http://newstonight.net/content/obesity-pushing-diabetes-cases

● http://lordapes.blogspot.in/

● http://blog.marketo.com/2013/07/big-data-it-doesnt-mean-what-you-think-it-means.html

● http://www.portaloko.hr/clanak/20-stvari-koje-muskarci-nikada-nece-shvatiti-kod-zena/0/59710/

● http://www.blankchapters.com/wp-content/uploads/2012/12/meme-data-data-everywhere.png

● https://medium.com/media-changes/don-draper-applies-for-a-job-in-2013-59aec7398582

● http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html

● http://www.slideshare.net/planetcassandra/apache-cassandra-and-datastax-enterprise-explained-with-peter-halliday-at-wildhacks-nu

● http://qph.is.quoracdn.net/main-qimg-dce3b73956c5313650022a5b22068982?convert_to_webp=true

● http://treasure.diylol.com/uploads/post/image/553987/resized_kevin-hart-meme-generator-i-would-take-questions-but-the-way-my-presentation-is-set-up-f1cfd6.jpg