Book description
Build a scalable, fault-tolerant and highly available data layer for your applications using Apache Cassandra
About This Book
Install Cassandra and set up multi-node clusters
Design rich schemas that capture the relationships between different data types
Master the advanced features available in Cassandra 3.x through a step-by-step tutorial and build a scalable, high performance database layer
Who This Book Is For
If you are a NoSQL developer and new to Apache Cassandra who wants to learn its common as well as not-so-common features, this book is for you. Alternatively, a developer wanting to enter the world of NoSQL will find this book useful.
It does not assume any prior experience in coding or any framework.
What You Will Learn
Install Cassandra
Create keyspaces and tables with multiple clustering columns to organize related data
Use secondary indexes and materialized views to avoid denormalization of data
Effortlessly handle concurrent updates with collection columns
Ensure data integrity with lightweight transactions and logged batches
Understand eventual consistency and use the right consistency level for your situation
Understand data distribution with Cassandra
Develop simple application using Java driver and implement application-level optimizations
In Detail
Cassandra is a distributed database that stands out thanks to its robust feature set and intuitive interface, while providing high availability and scalability of a distributed data store. This book will introduce you to the rich feature set offered by Cassandra, and empower you to create and manage a highly scalable, performant and fault-tolerant database layer.
The book starts by explaining the new features implemented in Cassandra 3.x and get you set up with Cassandra. Then you’ll walk through data modeling in Cassandra and the rich feature set available to design a flexible schema. Next you’ll learn to create tables with composite partition keys, collections and user-defined types and get to know different methods to avoid denormalization of data. You will then proceed to create user-defined functions and aggregates in Cassandra. Then, you will set up a multi node cluster and see how the dynamics of Cassandra change with it. Finally, you will implement some application-level optimizations using a Java client.
By the end of this book, you'll be fully equipped to build powerful, scalable Cassandra database layers for your applications.
Style and approach
This book takes a step-by- step approach to give you basic to intermediate knowledge of Apache Cassandra. Every concept is explained in depth, and is supplemented with practical examples when required.
Table of contents
- Preface
-
Getting Up and Running with Cassandra
- What is big data?
- Challenges of modern applications
- Why not relational databases?
- How to handle big data
- What is Cassandra and why Cassandra?
- MapReduce and Spark
- Installing Cassandra
- Installing the JDK
- Installing on Debian-based systems (Ubuntu)
- Installing on RHEL-based systems
- Installing on Windows
- Installing on Mac OS X
- Installing the binary tarball
- Bootstrapping the project
- CQL—the Cassandra Query Language
- Interacting with Cassandra
- Getting started with CQL
- New features in Cassandra 2.2, 3.0, and 3.X
- Summary
- The First Table
- Organizing Related Data
- Beyond Key-Value Lookup
- Establishing Relationships
- Denormalizing Data for Maximum Performance
- Expanding Your Data Model
-
Collections, Tuples, and User-Defined Types
- The problem with concurrent updates
- Collection columns and concurrent updates
- Using lists for ordered, non-unique values
- Using maps to store key-value pairs
- Collections in inserts
- Collections and secondary indexes
- The limitations of collections
- Working with tuples
- User-defined types
- Choosing between tuples and user-defined types
- Nested collections
- Nested tuples/UDTs
- Comparing data structures
- Summary
- Aggregating Time-Series Data
-
How Cassandra Distributes Data
- Data distribution in Cassandra
- Data replication in Cassandra
- Gossip protocol
- Multidata center cluster
- Consistency
- Handling conflicting data
- Distributed deletion
- Table configuration options
- Summary
- Cassandra Multi-Node Cluster
- Application Development Using the Java Driver
- Peeking under the Hood
- Authentication and Authorization
Product information
- Title: Learning Apache Cassandra - Second Edition
- Author(s):
- Release date: April 2017
- Publisher(s): Packt Publishing
- ISBN: 9781787127296
You might also like
book
Mastering Apache Cassandra - Second Edition
Build, manage, and configure high-performing, reliable NoSQL database for your application with Cassandra In Detail With …
book
Apache Cassandra Essentials
Create your own massively scalable Cassandra database with highly responsive database queries About This Book Create …
book
Cassandra: The Definitive Guide
What could you do with data if scalability wasn't a problem? With this hands-on guide, you'll …
book
Expert Apache Cassandra Administration
Follow this handbook to build, configure, tune, and secure Apache Cassandra databases. Start with the installation …