Download presentation
Presentation is loading. Please wait.
Published byVictor Neal Quinn Modified over 8 years ago
1
Amirhossein Saberi May 2016
2
CASSANDRA NAME A daughter of the Trojan king Priam, who was given the gift of prophecy by Apollo. When she cheated him, however, he turned this into a curse by causing her prophecies, though true, to be disbelieved.
3
RDBMS VS NOSQL Vertical scalingHorizontal scaling
4
WHAT'S WRONG WITH RELATIONAL DATABASE?
5
ACID GUARANTEE TRANSACTIONS ARE PROCESSED A tomic: Atomic means “all or nothing” C onsistent: Consistent means that data moves from one correct state to another correct state I solated: Isolated means that transactions executing concurrently will not become entangled with each other D urable: Once a transaction has succeeded, the changes will not be lost
6
INTRODUCTION Original authors: Avinash Lakshman, Prashant Malik Developer: Apache Software Foundation (Initially developed by Facebook to power their Inbox Search feature) Initial release: 2008 Stable release: 3.4 / March 8,2016 Written in: Java Type: Database / NoSQL License: Apache License 2.0 (permissive free software license) Apache Cassandra is an open source distributed database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure.
7
MAIN FEATURES Decentralized: Data located, stored, and maintained in a single location Supports replication and multi data center replication Scalability (Elastic Scaling) Fault-tolerant Tunable consistency: Strong consistency or eventual? MapReduce support: programming model and an associated implementation for processing and generating large data sets with a parallel, distributed algorithm on a cluster. Cassandra Query language (CQL) Fast write
8
WHAT PROBLEM DO YOU HAVE? RDBMS, NoSQL. The horse, the car, the plane. They each build on prior art, they each attempt to solve certain problems, and so they’re each good at certain things—and less good at others. They each coexist, even now. Do u need to fully support transactions with ACID guarantee? Do u need to have high availability and horizontal scalability?
9
CAP THEOREM Consistency (all nodes see the same data at the same time - every read would get you the most recent write) Availability (a guarantee that every request receives a response about whether it succeeded or failed) Partition tolerance (the system continues to operate despite arbitrary partitioning due to network failures)
10
CASSANDRA IN CAP
11
DATA MODEL MySQL Cassandra
12
REPLICATION Simple Strategy:Specifies a simple replication factor for the cluster. Network Topology Strategy: Using this option, you can set the replication factor for each data-center independently. Old Network Topology Strategy: This is a legacy replication strategy.
13
INSTALLATION 1.Download & Install JAVA 2.Download & Install Cassandra
14
COMMANDS [saberi@linux bin]$ cqlsh Connected to Test Cluster at 127.0.0.1:9042. [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native protocol v3] Use HELP for help. cqlsh> -CREATE KEYSPACE “KeySpace Name WITH replication = {'class': ‘Strategy name’, 'replication_factor' : ‘No.Of replicas’}; -CREATE TABLE tablename( column1 name datatype PRIMARYKEY, column2 name data type, column3 name data type. ) -INSERT INTO (,....) VALUES (,....) USING -SELECT FROM
15
REFERENCES http://robertgreiner.com/2014/06/cap-theorem-explained/ https://en.wikipedia.org/wiki/CAP_theorem https://dzone.com/articles/better-explaining-cap-theorem http://www.tutorialspoint.com/cassandra/cassandra_read_data.htm https://en.wikipedia.org/wiki/Apache_Cassandra http://www.datastax.com/nosql-databases http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis http://www.datastax.com/2011/09/cassandra-for-enterprise-tuneable-consistency-its-your-choice
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.