Riak newbie, need to know if I can switch from Cassandra for a messageQueue For Erlang
msegalis at gmail.com
Wed May 9 15:51:21 EDT 2012
Hi everyone !
I have followed with interest the riak evolution.
I have a chat server written in Erlang from scratch with my own protocol.
Right now I'm using MySQL in order to store Users credentials and friend list.
I'm using Cassandra via thrift to store message that an offline user has got, until the user retrieves it.
My Cassandra data model, is quite simple, a Column Family, each row is an user, each column is a message (title = timestamp for getting time ordered data, value = message).
The thing is, despite the fact that I'm happy with Cassandra performance and TimeToLive feature, I would like to avoid the hassle of thrift to update my code.
Since Riak is (As I have seen on multiple website) the closer thing to cassandra (but simpler).
However Riak paradigm seems to be different somehow, with bucket which I'm not yet familiar with.
Before getting to know Riak better I would like to have some expert opinion on the matter.
I need to do several things :
- Store from 1 to X messages per registered user.
- Get the number of stored messages per user. (may be stored on a variable)
- retrieve all messages from an user at once.
- delete all messages from an user at once.
- delete all messages that are older than X months no matter the user
I would really love your opinion on, is Riak fit my needs, and if so, what would be the data model ?
Is it realistic to have a bucket per user ?
More information about the riak-users