Hacker News new | ask | show | jobs
by rb2k_ 5226 days ago
I love to go back to Riak every now and then and throw one of the bigger datasets I have sitting around at a single node using Ruby. It is one of the most interesting databases out there and it's a breeze to set up (especially when compared to Cassandra).

It is kind of a shame though. Riak has awesome features, but some of them (e.g. secondary indexes) are hard to use and documentation is somewhat missing.

If you look at the official clients page (http://wiki.basho.com/Client-Libraries.html#Ruby), you can see ripple (https://github.com/seancribbs/ripple) but the page doesn't mention riak-ruby-client (https://github.com/basho/riak-ruby-client) which was split from ripple some time ago.

In theory, both of them support secondary indexes as far as I can tell, but you won't find that feature in either readme. There are some specs available that somehow describe parts of it though. I still don't see clearly how I could search secondary indexes from either library.

The same goes for things like data vs raw_data and serializers (small discussion: https://github.com/basho/riak-ruby-client/pull/19). While there is a very informative screencast in Seans blog, there is no mention in the readme file.

2 comments

Curious what you found so hard about setting up Cassandra. Counterpoint: http://www.screenr.com/5G6
I agree. Setting up Cassandra is simple. It is later when you get to things like:

    mutator.setColumnOrSuperColumn( ... )
    mutationsMap = new HashMap<ByteBuffer, Map<String, List<Mutation>>>()..

    compound column..
    super compound family of super columns...
where it feels more of a senior project, rather than something simple as:

    curl POST '{"red":2, "blue":4}' http://127.0.0.1:8091/riak/laundry/shirts
Although CQL fixes some of the problems with Cassandra complexity [Thrift does not even sound good in all 3 languages I know], I still believe it will be far more "desirable" (as the real http://en.wikipedia.org/wiki/Cassandra was) if more forces are applied to simplicity and polish.
It annoys the hell out of me that I can't launch the app by default because it points at directories that aren't user-writeable. Riak just has the etc and var directories inside the tarball. Cassandra just assumes that it is able to write to /var/...

Also: Setting up the Schema changes quite a bit since 0.7 and that was always kinda annoying. Nothing that is really that big of a problem, but it feels like I have to change the code every minor version since 0.7. (note that they didn't set up a schema in the screencast and the cluster that got started is pretty useless, isn't it?)

Wait, can't you fix the wiki? You're right that its an oversight, but one you can fix yourself.
Sure, if I actually knew the correct solution...

Seeing as Basho is backing Riak, I would assume that they would invest a little bit of time documenting what they actually did :)