Database Reference
In-Depth Information
Interacting with Cassandra
Most common programming languages have drivers for interacting with Cassandra. When
selecting a driver, you should look for libraries that support the CQL binary protocol ,
which is the latest and most efficient way to communicate with Cassandra.
Tip
The CQL binary protocol is a relatively new introduction; older versions of Cassandra used
the Thrift protocol as a transport layer. Although Cassandra continues to support Thrift,
avoid Thrift-based drivers, as they are less performant than the binary protocol.
Here are CQL binary drivers available for some popular programming languages:
Language
Driver
Available at
Java
DataStax Java Driver
github.com/datastax/java-driver
Python
DataStax Python Driver github.com/datastax/python-driver
Ruby
DataStax Ruby Driver github.com/datastax/ruby-driver
C++
DataStax C++ Driver
github.com/datastax/cpp-driver
C#
DataStax C# Driver
github.com/datastax/csharp-driver
JavaScript (Node.js) node-cassandra-cql
github.com/jorgebay/node-cassandra-cql
PHP
phpbinarycql
github.com/rmcfrazier/phpbinarycql
While you will likely use one of these drivers in your applications, to try out the code ex-
amples in this topic, you can simply use the cqlsh tool, which is a command-line interface
for executing CQL queries and viewing the results. To start cqlsh on OS X or Linux,
simply type cqlsh into your command line; you should see something like this:
$ cqlsh
Connected to Test Cluster at localhost:9160.
Search WWH ::




Custom Search