When Cassandra was first released, it originally provided a Thrift RPC-based API as the foundation for client developers to build upon. This proved to be suboptimal: Thrift is too low-level to use without a more idiomatic client wrapping it, and supporting new features (such as secondary indexes in 0.7 and counters in 0.8) became hard to maintain across these clients for many languages. Also, by not having client development hosted within the Apache Cassandra project itself, incompatible clients proliferated in the open source community, all with different levels of stability and features. It became hard for application developers to choose the best API to fit their needs.
Cassandra 0.7 introduced a stable version of its command-line client interface, cassandra-cli, that can be used for common data definition (DDL), data manipulation (DML), and data exploration. Although not intended for application development, it is a good way to get started defining your data model and becoming familiar with Cassandra.
CQL syntax is based on SQL (Structured Query Language). Although CQL has many similarities to SQL, it does not change the underlying Cassandra data model, which is not relational. There is no support for JOINs, for example.
Cassandra 0.8 was the first release to include the Cassandra Query Language (CQL). As with SQL, clients built on CQL only need to know how to interpret query resultset objects. CQL is the future of Cassandra client API development. CQL drivers are hosted within the Apache Cassandra project.
CQL version 2.0, which has improved support for several commands, is compatible with Cassandra version 1.0 but not version 0.8.x.
In Cassandra 1.1, CQL became the primary interface into the DBMS. The CQL specification was promoted to CQL 3, although CQL 2 remains the default because CQL3 is pre-release and not backwards compatible. The most significant enhancement of CQL 3 is support for compound primary key columns.
The Python driver includes a command-line interface, cql.sh. See Querying Cassandra.
The Thrift API will continue to be supported for backwards compatibility. Using a high-level client is highly recommended over using raw Thrift calls.
A list of other available clients may be found on the Client Options page.
The Java, Python, and PHP clients are well supported.
Hector provides Java developers with features lacking in Thrift, including connection pooling, JMX integration, failover and extensive logging. Hector is the first client to implement CQL.
For more information, see the Hector web site.
Pycassa is a Python client API with features such as connection pooling and a method to map existing classes to Cassandra column families.
For more information, see the Pycassa documentation.