cassandra with scala

Viewed 11030

Does anyone have advice on using cassandra with scala? There is no native scala-cassandra client supporting cassandra version 8.0+, so I have to use hector, and it seems to work OK but not to be concise. Do you have any attempts, recommendations or any wrapper code,.. etc for hector ?

5 Answers

Intro

As previous answers suggested Scala based clients for Cassandra are:

However, they both are internally based on Datastax Java Driver.

Personally, I did not like either of them and Java Driver felt much more natural and simple. On the other hand, those libraries created some overhead on top of it, so performance-wise they are always inferior.

Java Driver Scala Integration

I have found some articles (example) showing how you could integrate Java Driver better with Scala and it did not look hard.

The result is my own library that you can find on GitHub: https://github.com/atais/scassandra

It allows for seamless integration in Scala for both CQL queries and manipulating the ListenableFuture without mapping it into scala.Future.

Enjoy :)

Related