Database Reference
In-Depth Information
9. Drivers and Sample Code
In this chapter, we will present some of the clients for the most popular languages.
Using the most recent driver for each of the languages, we will outline how to con-
nect to a Cassandra cluster, initiate a session, execute CQL queries, and close the
connection to the cluster.
There are currently quite a few drivers for Cassandra. Table 9.1 shows the most
popular currently maintained drivers; their support of CQL, CBP (CQL Binary
Protocol), and Thrift; and where to get them.
Table 9.1 Various Clients
Clients that currently support the CQL 3 Binary Protocol also support auto-
matic node failure detection, as well as node failover and node load balancing.
DataStax-maintained drivers also come with optional smart load balancing for
keyspaces that use the Murmur3Partitioner. The smart load balancing will always
choose a coordinator node that is part of the replica set for that query; this gives a
slight performance improvement.
For more drivers and information on support for various languages and fea-
tures, planetcassandra.org is constantly maintained and has plenty of Cassandra
drivers, resources, and tutorials for getting started.
Search WWH ::




Custom Search