Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New Cassandra project - Astyanax or Java Driver?

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.

like image 612
su- Avatar asked Apr 18 '13 18:04

su-


2 Answers

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>
like image 101
Lyuben Todorov Avatar answered Sep 24 '22 13:09

Lyuben Todorov


I have personally used Hector, Astyanax, Pelops, Fluent Cassandra, Datastax's Driver and Pycassa and after using so many API's i finally realized that Astyanax suits me the best (Its my personal consideration).

The feature i found in astyanax which differentiate it from others in the league are

  • Ease of use of the API
  • Composite column support
  • Connection pooling
  • Latency
  • Documentation
  • Updated
like image 20
abhi Avatar answered Sep 22 '22 13:09

abhi