June 11th, 2014

The drivers team is pleased to announce the first beta release of the newly designed C/C++ driver for Apache Cassandra . This version targets Cassandra 2.0 and the CQL Native Protocol version 2, but future releases will bring support for Cassandra 1.2 and 2.1 (CQL Native Protocol versions 1 and 3). This first beta version comes with a complete rewrite of the initial code we’ve shared on GitHub. We’ve heard your feedback and also realized the technical limitations of the previous design, so we decided that we should provide an improved architecture, a higher performance implementation (based on libuv) and a cleaner pure C API. Here are some highlights of the features and improvements:

  • Clean and concise C API, allowing for easier integration with a broad set of applications including ANSI C applications and scripting languages
  • Full asynchronous API and internal architecture
  • Minimal dependencies, allowing the driver to support a variety of platforms including Linux, Windows, and Mac OSX.
  • High performance implementation that is scalable on multi-core systems
  • Support for Prepared and Batch Statements
  • Support for CQL Collection
  • Robust fail over and reconnection handling
  • Streamlined design that’s careful not to expose internal dependencies or implementation details

You can grab the source code from here. To help you get started using the driver we’ve provided several examples as well as a thoroughly documented header file: include/cassandra.h. To give you a taste of the new C API here are some snippets:

Simple insert with bound values


Simple select with iterators

Schema used in snippets


This release is just the beginning. In upcoming releases, we plan to rapidly support the same feature set as our other drivers. This includes supporting policies, SSL, compression and authentication. You can take a look at what we have planned on JIRA. As with our other drivers, we have spent significant effort testing this release. We have ensured good coverage by porting a number of tests from the previous C++ driver as well as other drivers. Here are some additional resources help you get started:

Source code: https://github.com/datastax/cpp-driver/

JIRA: https://datastax-oss.atlassian.net/browse/CPP

Mailing List:https://groups.google.com/a/lists.datastax.com/forum/#!forum/cpp-driver-user IRC: #datastax-drivers on irc.freenode.net We look forward to you using the driver and hearing your feedback.

DataStax C/C++ Driver: Beta release available!” was created by Michael Penick, Software Engineer at DataStax