Apache Cassandra 0.7 Documentation

Next Steps: Cassandra Clients

Once the cluster is up and running, you can begin using Cassandra clients to define and manipulate your data. DataStax recommends using the Cassandra CLI to define data objects such as keyspaces, column families, and columns. For normal read/write operations, DataStax recommends that you develop a client with one of the high-level client APIs. For initial stress testing, users with a full download of the Cassandra source can use stress.java.

For each client option, this document provides some basic examples with sample data. Where possible, the examples use sample data appropriate for the Twissandra Example described in the DataStax reference documentation. If you want to get more familiar with the Cassandra data model , review the reference documentation as well as resources such as these:

Cassandra’s data model has some similarities to traditional RDBMS modeling as well as some important differences. Some Cassandra experts believe the model is more readily grasped when new users explicitly do not try to use relational models as a starting point for understanding Cassandra.

The Cassandra CLI

An interactive command line interface is installed in every Cassandra instance at $CASSANDRA_HOME/bin/cassandra-cli. This CLI is useful for defining data objects such as keyspaces, column families, and columns.

For detailed instructions, see Using the Cassandra CLI.

Cassandra Client APIs

Given the active state of client and bindings development in the Cassandra community, there should continue to be a rich variety of options for client development. The client APIs listed in this section are stable enough and documented to a degree that DataStax can recommend them for your client development.

Java: Hector Client API

Hector provides Java developers with features lacking in Thrift, including connection pooling, JMX integration, failover and extensive logging.

For more information, see the Hector Wiki Page.

Python: Pycassa Client API

Pycassa is a Python client API with features such as connection pooling, SuperColumn support, and a method to map existing classes to Cassandra column families.

For more information, see the detailed Pycassa documentation.

PHP: Phpycassa Client API

Phpycassa is a PHP client API with features such as connection pooling, a method for counting rows, and support for secondary indexes.

For more information, see the detailed Phpycassa documentation.