Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What library should I use for accessing Riak from Scala?

Tags:

scala

riak

For a project I'm using both Scala and Riak (two things I have never worked with before ;) ).

Google searches seem to suggest using Riakki. However, it seems like that particular library hasn't been maintained since 2009 and doesn't even compile on my system. There is a more up-to-date fork on GitHub that does seem to work with more recent Scala versions. But Riakki seems to depend on Jiak, which has been deprecated since february of last year.

Seems like the only reasonable choice would be to use the official Riak Java-library from Scala. That's certainly possible, but I'd like to do things the Scala-way as I'm trying to learn the language. Having to interface with a Java-style API might ruin a bit of the fun. Writing my own wrapper sounds like it will be too much work.

tl;dr: I want to use Riak from Scala. What are other people using?

edit: just found Ryu (can't link to it - annoying limit on amount of hyperlinks per question for new users). Doesn't seem all that mature though.

like image 389
Marlies Avatar asked Apr 03 '11 15:04

Marlies


3 Answers

Stackmob recently opensourced Scalariak.

Scaliak is a scala-ified version of the High-Level Riak Java Client w/ a Functional Twist. It is currently being used in production at StackMob.

Scaliak is currently feature incomplete vs. the original High-Level Riak Java Client. What is currently supported are mostly features being used in production (there have been a few features implemented and subsequently not used).

There is also Raiku which states that it is async.

like image 176
om-nom-nom Avatar answered Nov 16 '22 19:11

om-nom-nom


I'm in the same bucket - excuse the bad pun - although I have some experience with Scala. I'm thinking of using the official Java client.

When you are toiling up a steep learning curve, you don't need to be dealing with incomplete and potentially wobbly API's. In my experience, using Java API's from Scala is minimally painful.

I think there'll be enough delight in playing with our new Raik toy that we'll forget about whatever un-Scala-ish foibles the Java API inflicts upon us. All the best.

like image 26
David Avatar answered Nov 16 '22 18:11

David


I'm the author of yet another Scala Riak client, simply called riak-scala-client. It is based on Akka and Spray, it is not built on top of the existing Java client, and most importantly it is completely non-blocking.

Check it out at http://riak.scalapenos.com and let me know what you think.

like image 39
Age Mooij Avatar answered Nov 16 '22 18:11

Age Mooij