Channels ▼

Mike Riley

Dr. Dobb's Bloggers

Cassandra: The Definitive Guide Book Review

December 07, 2010

Cassandra, one of the many recent database systems riding on the coattails of the NoSQL mantra, has made inroads among some of the more notable websites today. Written by Eben Hewitt, this book claims to be the definitive guide on the subject. Is it? Read on to find out.The book opens its introductory chapter asking the question "What's wrong with relational databases?" upon which the author proceeds to point out RDBMS strengths and weaknesses, followed by the Cassandra "elevator pitch" on what makes it a better choice for highly scalable, available, fault-tolerant, high performance and schema-free solution. A brief history of the project is followed by chapters on installing Cassandra and getting acquainted with its command line interface (creating a keyspace, column family and writing/reading data). Chapter 3 details the Cassandra data model, clustering, columns, rows, sorting and design patterns. A hotel reservation example Java application is demonstrated in Chapter 4, showing how the data model is constructed, the schema is defined in YAML, connecting, populating and searching. Chapter 5 reviews Cassandra's architecture, from its system keyspace, compaction and bloom filters to tombstones, managers and services, and messaging. Chapters 6, 7 and 8 cover configuration (including cluster, replication, and security settings), reading and writing data (including consistency levels, slice predicates and ranges and deletions), and clients (including Thrift, Avro, Hector, Chiton, Pelops, Kundera and Fauna). Chapters 9 through 11 cover monitoring (logging, JMX messaging, etc.), maintenance (obtaining statistics, managing load balancing), and performance tuning (storage, concurrency, caching, stress tests and JVM settings). The final chapter written by contributing writer Jeremy Hanna concludes on the topic of integrating Hadoop, the Apache Project's set of open source tools for managing large distributed data sets. Examples of a simple MapReduce job, along with several useful tools (Pig, Hive) and other best practices are suggested.

While the book supplies examples primarily written in Java, interfaces to Cassandra for popular languages like C#, Python, Ruby and Scala also exist, though no such code examples make it into the book. Due to Cassandra's Java-centricity, some developers may be put off by it due to the uncertainty in Java's future ownership direction and the fact that there are several other competing NoSQL choices vying for developer's attention these days. Thankfully, the author included an appendix that briefly explores these other choices (such as CouchDB, FlockDB, MongoDB and many others), comparing their implementation language, if it is distributed or requires a schema, what API talks to the client, the respective CAP (Consistency, Availability, Partition Tolerance) support and big website name production use. The book also has a glossary of the terms many new to the world of distributed database systems may need to get more familiar with.

In conclusion, Cassandra, a Java-based NoSQL system open-sourced by Facebook in 2008, is being used by some recognizable websites (especially among techies) including Cisco, Rackspace, Reddit, Twitter and of course, Facebook themselves. Given the technical pedigree of these high traffic web properties employing Cassandra is a testament to its robust durability. And while I hesitate agreeing that this book is indeed the 'Definitive Guide', it certainly does offer a valuable introduction to the technology. Future editions should consider having at least an appendix demonstrating how other languages besides Java talk to Cassandra, and a real gem would be a case study with a heavily invested Cassandra user like Facebook on how they implemented it, what works and what doesn't, and what's on their wishlist. But for now, the first edition of the book greases the wheels for developers and DBA's interested in learning what Cassandra has to offer.

Title: Cassandra: The Definitive Guide Author: Eben Hewitt Publisher: O'Reilly Media ISBN: 978-1-4493-9041-9 Pages: 336 Price: $31.99 (Ebook), $39.99 (Print)

Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 


Video