You are previewing Cassandra Design Patterns - Second Edition.
O'Reilly logo
Cassandra Design Patterns - Second Edition

Book Description

Build real-world, industry-strength data storage solutions with time-tested design methodologies using Cassandra

About This Book

  • Explore design patterns which co-exist with legacy data stores, migration from RDBMS, and caching technologies with Cassandra

  • Learn about design patterns and use Cassandra to provide consistency, availability, and partition tolerance guarantees for applications

  • Handle temporal data for analytical purposes

  • Who This Book Is For

    This book is intended for big data developers who are familiar with the basics of Cassandra and wish to understand and utilize Cassandra design patterns to develop real-world big data solutions. Prior knowledge of RDBMS solutions is assumed.

    What You Will Learn

  • Enable Cassandra to co-exist with RDBMS and other legacy data stores

  • Explore various design patterns to build effective and robust storage solutions

  • Migrate from RDBMS-based data stores and caching solutions to Cassandra

  • Understand the behaviour of Cassandra when trying to balance the needs of consistency, availability, and partition tolerance

  • Deal with time stamps related to data effectively

  • See how Cassandra can be used in analytical use cases

  • Apply the design patterns covered in this book in real-world use cases

  • In Detail

    There are many NoSQL data stores used by big data applications. Cassandra is one of the most widely used NoSQL data stores that is frequently used by a huge number of heavy duty Internet-scale applications. Unlike the RDBMS world, the NoSQL landscape is very diverse and there is no one way to model data stores. This mandates the need to have good solutions to commonly seen data store design problems. Cassandra addresses such common problems simply.

    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.

    Style and approach

    This book is written in very simple language and an engaging style complete with examples in every chapter and real-world use cases at the end of the book.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

    Table of Contents

    1. Cassandra Design Patterns Second Edition
      1. Table of Contents
      2. Cassandra Design Patterns Second Edition
      3. Credits
      4. About the Author
      5. Acknowledgements
      6. About the Reviewers
      7. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
      8. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      9. 1. Co-existence Patterns
        1. A brief overview of Cassandra
        2. Denormalization pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        3. Reporting pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        4. Aggregation pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        5. References
        6. Summary
      10. 2. RDBMS Migration Patterns
        1. A brief overview
        2. List pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        3. Set pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        4. Map pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        5. Distributed Counter pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        6. Purge pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        7. References
        8. Summary
      11. 3. Cache Migration Patterns
        1. A brief overview
        2. Cache to NoSQL pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        3. References
        4. Summary
      12. 4. CAP Patterns
        1. A brief overview
        2. Write-heavy pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        3. Read-heavy pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        4. Read-write balanced pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        5. References
        6. Summary
      13. 5. Temporal Patterns
        1. A brief overview
        2. Time series pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        3. Log pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        4. Conversation pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        5. References
        6. Summary
      14. 6. Analytics Patterns
        1. Processing big data
          1. Apache Hadoop
          2. Apache Spark
          3. Transforming data
        2. A brief overview
        3. Map/Reduce pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        4. Transformation pattern
          1. Motivations/solutions
          2. Best practices
          3. Example
        5. References
        6. Summary
      15. 7. Designing Applications
        1. A brief overview
        2. Application design and use cases
        3. Service management and use cases
        4. References
        5. Summary
      16. Index