Learning Objectives for Developer Training with Cassandra

Summary

Duration: 2 Days
Hands-on: Minimum 50% hands-on
Prerequisites: Some knowledge of databases
Supported Platforms: Cassandra 1.2 and CQL 3 on Linux Operating Systems (VM provided for labs)

Course Description:

The Cassandra (C*) NoSQL database is one of the most powerful and widely used non-relational databases available today. It is a fault tolerant, highly scalable database with tunable consistency that meets the demanding requirements of the “can’t fail, must scale” systems driving growth for many of the most successful enterprises of today. However, along with that capability comes a new data and programming model that many organizations lack the expertise to use in an optimal fashion.

This course provides a technical introduction to all the conceptual and practical areas needed to use Cassandra successfully. It is written expressly for the new capabilities of CQL 3 in the recent versions of C*. The course provides a solid foundation in the architecture and data model of C* and how to work with it. It covers CQL3 in detail, as well as important data modeling techniques to optimize your usage of the database. It includes a full-scale application based on a stock-trading system (StockWatcher) that uses the data models you create in class.

After taking this course, you will be ready to work with Cassandra in an informed and productive manner, including modeling and accessing your data with CQL3. You will be aware of some common pitfalls as well as best practices for creating your data model and applications. You will gain a clear understanding of how C* works, and be fully prepared to use it in production systems.

Skills Gained:

  • Understand the motivation for non-relational data stores
  • Be familiar with Cassandra at a high-level
  • Be familiar with basic installation / setup of Cassandra, and how an installation is structured
  • Understand the Cassandra architecture, including the cluster structure and partitioners
  • Understand and use data replication and eventual consistency with Cassandra
  • Learn the basics of the Cassandra data model, and how to create good data models
  • Use CQL 3 to create tables and execute queries
  • Learn and use cqlsh
  • Know the standard CQL data types
  • Understand and use primary keys, compound primary keys, and composite partition keys
  • Understand and use collections, secondary indexes, counters, and batches
  • Understand the issues and techniques in modeling time series data

Course Details:

Session 1: Introduction to Cassandra

  • Overview
    • The motivation for non-relational data stores
    • Why relational databases don’t support modern applications well
    • Cassandra at a high-level
    • Use cases
    • Features Strengths (Scalability, robustness, linear performance with scale-out), etc.
    • High Level Structure
  • Acquiring and Installing Cassandra
  • Configuring and Installation Structure
  • LABS:
    • Configure, Start/Stop Cassandra
    • StockWatcher Demo

Session 2: Overview of Architecture and Data Model

  • Basic Cassandra Architecture
    • Cluster Structure – Nodes, Virtual Nodes, Ring Topology
    • Consistent Hashing, Tokens, Partitioners, and Data Distribution
    • Data Replication, the Replication Factor, Keyspaces
    • Consistency, the CAP theorem, Eventual Consistency
  • The C* Data Model
    • Data Model and CQL 3 Introduction
    • Using CQL and cqlsh
    • Single primary key tables and how to define them using CQL
    • Inserting Data (INSERT), Data Distribution in the Ring, Upsert
    • Querying for Data (SELECT)
    • CQL Data Types
    • Working with Primary Keys
  • LABS
    • Spin up the Lab Cluster
    • Create Simple Tables
    • Insert/Query Tables
    • Use copy to Populate a Table

Session 3: The Cassandra Data Model

  • Compound Primary Keys
    • CQL table definition
    • The partition key and clustering columns
    • CQL Mapping vs. Internal Storage View
  • Other Capabilities
    • Expiring Columns / Time To Live (TTL)
    • Batches
    • Clustering order, ORDER BY, and CLUSTERING ORDER BY
    • Filtering results and ALLOW FILTERING
  • Composite Partition Keys
    • Motivation and uses
    • Working with Time Series Data
    • CQL Definition
    • Effect on Partitioning and Internal Storage View
  • Indexes and Secondary Indexes
    • Partition Key Indexes, token()
    • Non-primary Key (Secondary) Indexes
    • Guidelines and Querying
  • Understand and Use Counters
    • Motivation and Uses
    • Structure, Characteristics, CQL, Usage
    • Limitations
  • Understand and use collections
    • Motivation and uses
    • CQL definition (set, list, and map)
    • Inserting, Updating, Deleting with a Collection
    • Limitations and Internal Storage View
  • LABS:
    • Introduce Compound Primary Keys
    • Refine Compound Primary Key
    • Work with Composite Partition Keys
    • Secondary Indexes
    • Counters
    • Using Collections

Session 4: Data Consistency

  • Data Consistency in Cassandra
    • Tunable Consistency
    • CAP Theorem
    • Coordinators and Client Requests
    • Consistency Levels in C* – ONE, QUORUM, ALL
    • Configuring Immediate Consistency
    • CL ONE is Your Friend
    • Other CL Levels
  • Repair Mechanisms
    • Read Repair
    • Hinted Handoff
  • LABS:
    • Data Consistency

Session 5: How Things Work

  • Write Failures
    • Unavailability, Node Failure
    • Requirements for Writing
  • Key and Row Caches
    • Cache Overview
    • Guidelines
  • Multi-Data Center Support
    • Overview
    • Replication Factor Configuration
    • Consistency Levels – LOCAL/EACH QUORUM
  • Deletes
    • CQL
    • Tombstones
    • Issues and Guidelines
  • LABS:
    • Deletes

For more information, contact us.