Working with Cassandra (for Developers)

NA

TTDS6776

Intermediate and Beyond

3 Days

Course Overview

The Cassandra (C*) database is a massively scalable NoSQL database that provides high availability and fault tolerance, as well as linear scalability when adding new nodes to a cluster. It has many powerful capabilities, such as tunable and eventual consistency, that allow it to meet the needs of modern applications, but also introduce a new paradigm for data modeling that many organizations do not have the expertise to use it in the most efficient manner.

This course provides an in-depth introduction to using Cassandra and creating good data models with Cassandra. It is technical and comprehensive, with a focus on the practical aspects of working with C*. It introduces all the important concepts needed to understand Cassandra, including enough coverage of internal architecture to make good decisions. It is hands-on, with labs that provide experience in all the important areas. It covers CQL (Cassandra Query Language) in depth, as well as covering the Java API for writing Cassandra clients.

After taking this course, you will have learned what you need to productively work with Cassandra as well as guidelines for using it in an optimal manner. You'll also understand some of the "anti-patterns" that lead to non-optimal C* data models. You'll be familiar with CQL and with the Java client library and be ready to work on production systems involving Cassandra.

Course Topics:  This is a high-level list of the course topics covered in this training. Please see the detailed Course Agenda with session details, lessons and labs listed below.

 

·        Session 1: Cassandra Overview

·        Session 2: Cassandra Architecture and CQL Overview

·        Session 3: Data Modeling and CQL Core Concepts

·        Session 4: Additional CQL Capabilities

·        Session 5: Data Consistency In Cassandra

·        Session 6: Lightweight Transactions (LWT)/ Compare and Set (CAS)

·        Session 7: Practical Considerations

·        Session 8: The Java Client API

 

 

Course Objectives

This “skills-centric” course is about 50% hands-on lab and 50% lecture, designed to train attendees in core Cassandra skills, coupling the most current techniques with the soundest industry practices. Throughout the course students will be led through a series of progressively advanced topics, where each topic consists of lecture, group discussion, comprehensive hands-on lab exercises, and lab review.

 

Working in a hands-on learning environment, students will learn:

  • Understand the needs that C* addresses
  • Be familiar with the operation and structure of C*
  • Be able to install and set up a C* database
  • Use the C* tools, including cqlsh, nodetool, and ccm (Cassandra Cluster Manager)
  • Be familiar with the C* architecture, and how a C* cluster is structured
  • Understand how data is distributed and replicated in a C* cluster
  • Understand core C* data modeling concepts, and use them to create well-structured data models
  • Use data replication and eventual consistency intelligently
  • Understand and use CQL to create tables and query for data
  • Know and use the CQL data types (numerical, textual, uuid, etc.)
  • Understand the various kinds of primary keys available (simple, compound, and composite primary keys)
  • Use more advanced capabilities like collections, counters, secondary indexes, CAS (Compare and Set), static columns, and batches
  • Be familiar with the Java client API
  • Use the Java client API to write client programs that work with C*
  • Build and use dynamic queries with QueryBuilder
  • Understand and use asynchronous queries with the Java API

Course Prerequisites

This in an intermediate-level course is geared for experienced Java developers seeking to be proficient in Apache Cassandra.  Attendees should be experienced developers who are comfortable with Java, and have reasonable experience working with databases. Students should also be able to navigate Linux command line, and who have basic knowledge of Linux editors (such as VI / nano) for editing code.

Course Agenda

Session 1: Cassandra Overview

·        Why We Need Cassandra

·        High level Cassandra Overview

·        Cassandra Features

·        Basic Cassandra Installation and Configuration

 

Session 2: Cassandra Architecture and CQL Overview

·        Cassandra Architecture Overview

·        Cassandra Clusters and Rings

·        Data Replication in Cassandra

·        Cassandra Consistency / Eventual Consistency

·        Introduction to CQL

·        Defining Tables with a Single Primary Key

·        Using cqlsh for Interactive Querying

·        Selecting and Inserting/Upserting Data with CQL

·        Data Replication and Distribution

·        Basic Data Types (including uuid, timeuuid)

 

Session 3: Data Modeling and CQL Core Concepts

·        Defining a Compound Primary Key

·        CQL for Compound Primary Keys

·        Partition Keys and Data Distribution

·        Clustering Columns

·        Overview of Internal Data Organization

·        Additional Querying Capabilities

·        Result Ordering - ORDER BY and CLUSTERING ORDER BY

·        UPDATE and DELETE Queries

·        Result Filtering, ALLOW FILTERING

·        Batch Queries

·        Data Modeling Guidelines

·        Denormalization

·        Data Modeling Workflow

·        Data Modeling Principles

·        Primary Key Considerations

·        Composite Partition Keys

·        Defining with CQL

·        Data Distribution with Composite Partition Key

·        Overview of Internal Data Organization

 

Session 4: Additional CQL Capabilities

·        Indexing

·        Primary/Partition Keys and Pagination with token()

·        Secondary Indexes and Usage Guidelines

·        Cassandra Counters

Counter Structure and 

  • Definition
  • Using Counters
  • Counter Limitations
  • Cassandra collections
  • Collection Structure and Uses
  • Defining Collections (set, list, and map)
  • Querying Collections (Including Insert, Update, Delete)
  • Limitations
  • Overview of Internal Storage Organization
  • Static Column: Overview and Usage
  • Static Column Guidelines
  • Materialized View: Overview and Usage
  • Materialized View Guidelines

 

Session 5: Data Consistency In Cassandra

  • Overview of Consistency in Cassandra
  • CAP Theorem
  • Eventual (Tunable) Consistency in C* - ONE, QUORUM, ALL
  • Choosing CL ONE
  • Choosing CL QUORUM
  • Achieving Immediate Consistency
  • Using other Consistency Levels
  • Internal Repair Mechanisms (Read Repair, Hinted Handoff)

 

Session 6: Lightweight Transactions (LWT)/ Compare and Set (CAS)

  • Overview of Lightweight Transactions
  • Using LWT, the [applied] Column
  • IF EXISTS, IF NOT EXISTS, Other IF conditions
  • Basic CAS Internals
  • Overhead and Guidelines

 

Session 7: Practical Considerations

  • Dealing with Write Failure
  • Unavailable Nodes and Node Failure
  • Requirements for Write Operations
  • Key and Row Caches
  • Cache Overview
  • Usage Guidelines
  • Multi-Data Center Support
  • Overview
  • Replication Factor Configuration
  • Additional Consistency Levels - LOCAL/EACH QUORUM
  • Deletes
  • CQL for Deletion
  • Tombstones
  • Usage Guidelines

 

Session 8: The Java Client API

  • API Overview
  • Introduction
  • Architecture and Features
  • Connecting to a Cluster
  • Cluster and Cluster.Builder
  • Contact Points, Connecting to a Cluster
  • Session Overview and API
  • Working with Sessions
  • The Query API
  • Overview
  • Dynamic Queries, Statement, SimpleStatement
  • Processing Query Results, ResultSet, Row
  • PreparedStatement, BoundStatement
  • Binding Values and Querying with PreparedStatements
  • CQL to Java Type Mapping
  • Working with UUIDs
  • Working with Time/Date Values
  • Working with Batches of SimpleStatement and PreparedStatement
  • Dynamic Queries and QueryBuilder
  • QueryBuilder Overview and API
  • Building SELECT, DELETE, INSERT, and UPDATE Queries
  • Creating WHERE Clauses
  • Other Query Examples
  • Configuring Query Behavior
  • Setting LIMIT and TTL
  • Working with Consistency
  • Using LWT
  • Working with Driver Policies
  • Load Balancing Policies - RoundRobinPolicy, DCAwareRoundRobinPolicy
  • Retry Policies - DefaultRetryPolicy, DowngradingConsistencyRetryPolicy, Other Policies
  • Reconnection Policies
  • Asynchronous Querying Overview
  • Synchronous vs. Asynchronous Querying
  • Executing Asynchronous Queries
  • java.util.concurrent.Future
  • Cassandra ResultSetFuture

Course Materials

Each student will receive a course Student Guide, complete with course notes, code samples, software tutorials, diagrams and related reference materials and links. Our courses also include our Student Workbook, with step by step hands-on lab instructions and project files (as necessary) and solutions, clearly illustrated for users to complete hands-on work in class, and to revisit to review or refresh skills at any time.  Students will also receive the course set up files, project files (or code, if applicable) and solutions required for the hands-on work.

Raise the bar for advancing technology skills

Attend a Class!

Live scheduled classes are listed below or browse our full course catalog anytime

Special Offers

We regulary offer discounts for individuals, groups and corporate teams. Contact us

Custom Team Training

Check out custom training solutions planned around your unique needs and skills.

EveryCourse Extras

Exclusive materials, ongoing support and a free live course refresh with every class.

Attend a Course

Please see the current upcoming available open enrollment course dates posted below. Please feel free to Register Online below, or call 844-475-4559 toll free to connect with our Registrar for assistance. If you need additional date options, please contact us for scheduling.

Course Title Days Date Time Price
Working with Cassandra (for Developers) 3 Days May 17 to May 19 10:00 AM to 06:00 PM EST $2,295.00 Register
Working with Cassandra (for Developers) 3 Days Jul 12 to Jul 14 10:00 AM to 06:00 PM EST $2,295.00 Register
Working with Cassandra (for Developers) 3 Days Sep 13 to Sep 15 10:00 AM to 06:00 PM EST $2,295.00 Register
Working with Cassandra (for Developers) 3 Days Nov 15 to Nov 17 10:00 AM to 06:00 PM EST $2,295.00 Register

New Site, BIG Savings!
We're celebrating the launch of our lonnngggg awaited new site with with *50% off all 2021 Public Classes* booked by March 31!  Check out our Current Offers for Individuals, Teams and Organizations to Learn for Less!

See our latest Offers and Promotions

Learn. Explore. Advance!

Extend your training investment! Recorded sessions, free re-sits and after course support included with Every Course
Trivera MiniCamps
Gain the skills you need with less time in the classroom with our short course, live-online hands-on events
Trivera QuickSkills: Free Courses and Webinars
Training on us! Keep your skills current with free live events, courses & webinars
Trivera AfterCourse: Coaching and Support
Expert level after-training support to help organizations put new training skills into practice on the job

The voices of our customers speak volumes

Special Offers
Limited Offer for most courses.

SAVE 50%

Learn More