CompanyMay 9, 2013

DataStax Java Driver: A new face for Cassandra

Michaël Figuière
Michaël FiguièreSoftware Engineer
DataStax Java Driver: A new face for Cassandra

Cassandra has always benefited from a great architecture, thought from the very beginning for scalability, performance and availability. This is surely what has driven its tremendous success so far. Unfortunately, early versions of Cassandra also came with a rather complex interface and data model that were negatively impacting the learning curve for developers. To solve this issue the Apache Cassandra team came up with a great new language and abstraction: CQL3. This clearly renewed the face of Cassandra, bringing a consistent interface across all languages and tools.

Thrift, the transport layer that Cassandra traditionally used for client-server communication, has been a great opportunity for the database in its early days since Thrift clients were readily available for most programming languages. This allowed the Apache Cassandra project to focus on the server side without spreading their resources on the client side. Nevertheless, as Cassandra became mature, Thrift turned out to be a limitation: communication limited to the request-response paradigm, no notifications, no streaming, client side interface made of generated code, etc. In Cassandra 1.2, a solution to this second problem was introduced with the CQL Native Protocol, a protocol designed exclusively for CQL3 and with enough flexibility to enable new features in Cassandra for the years to come.

With these two majors changes, an update was obviously necessary on the client side. The fact that we had a renewed interface and transport layer, together with the need for an environment free of any Thrift concepts, strongly advocated for a brand new line of drivers, which was aligned with the long-term strategy of CQL.

Today, DataStax announces version 1.0.0 of a new Java Driver, designed for CQL and based on years of experience within the Cassandra community. This Java driver is a first step; an object mapping and a JDBC extension will be available soon, drivers for C# and other major languages are on their way. Besides this new interface and API, this new driver comes with:

  • Node discovery, load balancing, and fail-over are implemented in a standardized way across all languages
  • Asynchronous API, making it simple to send multiple requests in parallel
  • Query builder, which makes it possible to create queries programmatically
  • Tracing, a new feature in Cassandra 1.2, that will quickly become part of everyday tools for developers working with CQL

In the weeks to come, several articles on this blog will cover some particular features of this Java Driver. Meanwhile, its documentation is readily available and you can start to use it right away using the following Maven dependency:

<dependency>
   <groupId>com.datastax.cassandra</groupId>
   <artifactId>cassandra-driver-core</artifactId>
   <version>1.0.0</version>
</dependency>
Discover more
Java
Share

One-stop Data API for Production GenAI

Astra DB gives JavaScript developers a complete data API and out-of-the-box integrations that make it easier to build production RAG apps with high relevancy and low latency.