1

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.

1 Answer 1

5

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Agreeing on this. We run into multiple problems with the spring data cassandra driver and moved back to the datastax java driver. If you need paging and complex searches you should consider DSE or elassandra.
@AlexTbk & Aaron , is there any sample git code to use DataStax driver with spring boot ?
Not really well readable in a comment here, but I try: public BaseRepository(final CassandraOperations cassandra, Session session) { this.cassandra = cassandra; this.session = session; } protected T fetchOne(final Select select) { select.setFetchSize(FETCH_SIZE); select.setConsistencyLevel(ConsistencyLevel.LOCAL_QUORUM); return cassandra.selectOne(select, getGenericTypeClass()); }

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.