Book Image

Learning Apache Cassandra - Second Edition

Book Image

Learning Apache Cassandra - Second Edition

Overview of this book

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.
Table of Contents (14 chapters)

New features in Cassandra 2.2, 3.0, and 3.X


Since the first edition of this mostly covered Cassandra versions 2.1 and below, here is a list of features and improvements that have been made to Cassandra starting version 2.2 and beyond. This will give you a gist of how Cassandra has matured over the last year:

  • JSON in CQL3: Cassandra 2.2 has support for inserting and selecting JSON data
  • User-defined functions: These can be defined to apply a function to data stored in Cassandra
  • User-defined aggregates: Using user-defined functions, custom aggregation functions can be stored in Cassandra
  • Role-based access control: In addition to per-user access control, now roles can be defined for role-based access control
  • Support for Windows 7, Windows 8, Windows 10, Windows Server 2008, and Windows Server 2012
  • The storage engine has been refactored
  • Materialized views: Materialized views have been added to handle server side denormalization, with consistency between base and view
  • G1 garbage collector: The default garbage collector has been changed to G1 from CMS (concurrent mark and sweep), which has markedly increased performance for higher values of JVM heap sizes
  • Hints are stored in files and replay has been improved

Note

Apart from these, there have been a plethora of operational improvements. You can take a look at them at https://docs.datastax.com/en/cassandra/3.x/cassandra/features.html.