Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redis client library recommendations for use from Scala

Tags:

redis

scala

I'm planning some work with a Redis instance from Scala and am looking for recommendations on what client library to use. Ideally I'd like a library designed for Scala (rather than Java) if a good one exists, but it's not the end of the world to just use a Java client if that's the better approach right now.

The official client list shows scala-redis as the only Scala-specific option, but it's pretty dated, and it has a number of forks with various improvements and enhancements... so it's not clear which (if any) is the one to use.

Current short list:

  1. Fork and improve acrosa's scala-redis (linked to from redis.io)
  2. debasishg's scala-redis fork (lots of additions, fixes, refactorings)
  3. Use Jedis from Scala

Leaning towards Jedis right now since it seems pretty active and well regarded, but curious what others have chosen when using Redis from Scala.

like image 435
overthink Avatar asked Feb 02 '11 18:02

overthink


2 Answers

Just to close off this question: due to the fragmentation amongst Scala clients, we ended up just using Jedis, which has been great so far.

like image 86
overthink Avatar answered Sep 17 '22 14:09

overthink


I wasn't happy with any of the choices, so I created a new client. It doesn't yet have complete support for Redis, and as far as I know I am the only one that uses it, but it does work well.

http://github.com/derekjw/fyrie-redis

The biggest change I made was a serialization using implicits, although I have ported that into Debasish's scala-redis fork (which is used in Akka). The other major difference between mine and the others is that it is implemented with non blocking io, and it is built using Akka actors so the client can be used asynchronously. This allows very high performance with only a single client (scala-redis, on the other hand, is completely synchronous). I haven't had a chance to work on it in the last couple months though.

Probably not the answer you are looking for though, sorry!

like image 29
derekjw Avatar answered Sep 20 '22 14:09

derekjw