Database Reference
In-Depth Information
enabled, MongoDB can now support databases with a working set much
larger than possible on a single-machine.
Cassandra
Cassandra is a database system that implements features similar to
Amazon's DynamoDB (one of Cassandra's original authors worked on the
DynamoDB project) and Google's BigTable.
Unfortunately, with an implementation similar to BigTable came a “query
language” also similar to BigTable. Based on the internal Thrift data
structures, it was cumbersome to use and unfamiliar to most developers.
This led to a reputation of Cassandra being difficult to use and hard to
maintain and a “dead end.”
This reputation was furthered when Facebook, the original developers of
Cassandra, “abandoned” it in favor of HBase when implementing the
Facebook instant messaging feature. Of course, this had more to do with
a consistency model than anything else—an instant messaging application
needs to be strongly consistent. The user should not “lose” messages if
their application happens to use a server in the cluster that is in a state
inconsistent with the last server they used on the last call. Cassandra's data
model is eventual consistency, making it a poor choice for this application.
HBase is strongly consistent, which has its own issues, but makes it much
more appropriate for that sort of application. Most real-time analytics
applicationscantolerateeventualconsistencybecausethedataisaflow,and
the changing set of consistent servers acts more like an application delay
than anything else.
The introduction of the Cassandra Query Language (CQL) has done a lot
to ease the pain of working with Cassandra. With CQL 3.0, essentially all
of the original BigTable-like structure has been abstracted into an SQL-like
language that should be familiar to most developers. There are some
limitations to the CQL language, limited aggregation functions among other
things, but the Cassandra design is such that it favors extensive
denormalization of tables. This increases the storage overhead and
introduces a write-time aggregation cost, but this is not as much of a
concern in a scale-out architecture like Cassandra.
This section introduces Cassandra's architecture and data model. Cassandra
is similar to other DynamoDB- and BigTable-inspired databases like HBase
Search WWH ::




Custom Search