That doesn't seem bad at all. I think there even were some attempts to make
a Riak backend for RabbitMQ.

I'd say, keep messages as separate objects, and keep their IDs ordered
inside a sibling-based structure, built on top of statebox[1] or
riak_dt[2]. The downsides are: two writes and reads every time, potential
data leaks if you don't make sure the consumed message is deleted. But
storing an entire queue in a single object sounds like a dangerous idea –
one might grow too much.

Also, keep in mind that your queues will be eventually consistent.


Or, as Jeremiah says, you can really wait till Riak 2.0, it might have most
of the implementation problems solved, you'll just need to write a bit of
code.


[1] https://github.com/mochi/statebox
[2] https://github.com/basho/riak_dt


On Wed, Sep 11, 2013 at 4:29 PM, Alex Rice <a...@mindlube.com> wrote:

> Hi I'm very new to Riak. The allow_mult = true /  Siblings feature is
> very interesting. Could it be used to implement a high performance
> collection like a Queue or Set, in a lock free manner? The Riak docs
> make it sound like allow_mult is mainly for confict resolution and
> degenerate cases, rather than a feature which a data structure could
> be designed around.  Does anyone have any links to share, or thoughts
> about this broader issue?
> Thanks much!
> Alex
>
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>



-- 
Best regards,
Dmitry Demeshchuk
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to