Book Image

Cassandra Design Patterns - Second Edition

By : Rajanarayanan Thottuvaikkatumana
Book Image

Cassandra Design Patterns - Second Edition

By: Rajanarayanan Thottuvaikkatumana

Overview of this book

If you are new to Cassandra but well-versed in RDBMS modeling and design, then it is natural to model data in the same way in Cassandra, resulting in poorly performing applications and losing the real purpose of Cassandra. If you want to learn to make the most of Cassandra, this book is for you. This book starts with strategies to integrate Cassandra with other legacy data stores and progresses to the ways in which a migration from RDBMS to Cassandra can be accomplished. The journey continues with ideas to migrate data from cache solutions to Cassandra. With this, the stage is set and the book moves on to some of the most commonly seen problems in applications when dealing with consistency, availability, and partition tolerance guarantees. Cassandra is exceptionally good at dealing with temporal data and patterns such as the time-series pattern and log pattern, which are covered next. Many NoSQL data stores fail miserably when a huge amount of data is read for analytical purposes, but Cassandra is different in this regard. Keeping analytical needs in mind, you’ll walk through different and interesting design patterns. No theoretical discussions are complete without a good set of use cases to which the knowledge gained can be applied, so the book concludes with a set of use cases you can apply the patterns you’ve learned.
Table of Contents (15 chapters)

Log pattern


An IoT application, or a collection of applications running in an enterprise, generate abundant amount of log entries. Many of the log entries are for the human beings to read, and others are used by other applications. These log entries have all the properties of temporal data. They are processed like temporal data. They are accessed either in the same order or the reverse order of their occurrence. They are used for analytical purposes. They are used for auditing purposes. They are stored for compliance reasons. The processing of a huge amount of temporal data mandates the need to store them just like any other temporal data store. Logs can be collected in Cassandra as a sink. Since application logs have the behavior of temporal data, with the timestamp or timeuuid data types for the Valid Time or Transaction Time, logs can be effectively collected and processed in Cassandra. It is ideal to store all the most commonly needed records in one big row if possible because this will...