New Cassandra project - Astyanax or Java Driver?

su- picture su- · Apr 18, 2013 · Viewed 8.4k times · Source

I'm starting a new project with Cassandra (and plan to use the latest stable (1.2.x) version). I have tried several different Java libraries, like Hector, Astyanax, Cassandra-jdbc...

Among them, (in short) my choice is Astyanax. But then I also found and tried DataStax's Java Driver, which support new CQL binary protocol, and is much cleaner if you are only using CQL. And it seems version 1.0.0 GA will be released soon.

Which one would you recommend? Thanks.

Answer

Lyuben Todorov picture Lyuben Todorov · Apr 19, 2013

I'd advise you to go with a cql3 based driver. Some choices are the the JDBC driver or even better Datastax's driver which supports asynchronous connections. You might have to build datastax's driver yourself, but this can be done with ease using maven.

Thrift isn't going to be getting any new features in Cassandra, its being kept for backwards comparability and most C* community members advice to use cql based drivers for new projects:

As described above, we believe that CQL3 is a simpler and overall better API for Cassandra than the thrift API is. Therefore, new projects/applications are encouraged to use CQL3

- source

Also CQL's performance is getting better very quickly. Here are some outdated benchmarks.
UPDATE

Since the answer was written a maven central repository was created for the driver so now to use it just add the dependency to maven:

<dependency>
    <groupId>com.datastax.cassandra</groupId>
    <artifactId>cassandra-driver-parent</artifactId>
    <version>1.0.0</version>
</dependency>