Search code examples
cassandracassandra-3.0datastax-java-driverspring-data-cassandra

Which one is better to use for interacting cassandra with java?


I need to insert and pull the data from AWS C* table. My producer of data is defined with Spring Boot with Java8.

So which one I should I use for my project which is stable and efficient. I got ways ( here I guess) 1. Sprinda-data-JPA. 2. cassandra-driver-core of datastax.


Solution

  • Disclaimer: Questions like this...asking which tool/library is "better" is subjective, and isn't usually a good fit for Stack Overflow.

    That being said, the Spring Data Cassandra driver inherently violates two known Cassandra data access anti-patterns (that I know of):

    • Unbound SELECT COUNT(*) as a part of their paging mechanism.
    • Use of BATCH for multiple writes.

    Additionally, the Spring Data Cassandra driver uses the DataStax driver, providing an additional delay for bug fixes and upgrades.

    tl;dr;

    You cannot go wrong by using the DataStax Java driver, and I highly recommend its use.