Introducing Ripple 0.5: "You Got your Riak in my Ruby"

by Sean Cribbs

I’ve teased and toyed with you over the last few days, and finally I’m proud to announce the release of Ripple, a client library and object-mapper for Riak, Basho Technologies’ distributed database.

Since this is a first release, there are a few rough edges, but I think it’s ready enough for the community to start using it.

Acknowledgments

Two awesome companies, Sonian and Basho, enabled me to spend most of 6 weeks building this library. Many kudos go to them for their financial support and technical direction on hard problems.

The Goods

For the impatient (or ecstatic) here’s all the Ripple resources:

How this project started

You’ve already read roughly how I came to know about Riak in my first post. Here’s the rest of the story.

In November or December, Tim Dysinger, VP Engineering at Sonian and all-around awesome guy, started expressing his interest in using Riak to back their Ruby apps. Since I was already interested in Riak, I pressed him for a contract to build the Ruby library now known as Ripple, and later Basho signed on as a co-sponsor.

More about the library

The feature list:

To use Ripple, you need Ruby 1.8.7 or later, and the ActiveModel and ActiveSupport gems from the Rails 3 beta release. Rails 3 will be out very soon, so it might be good to go ahead and get your app ready for it. More details about development and dependencies can be found in the YARD documentation

Usage notes

  1. Ripple has two namespaces. require 'riak' to get just the basic client – this should give you parity with the old jiak.rb included in the Riak distribution, plus a lot more niceties. require 'ripple' to get both the basic client and the (functional but incomplete) object-mapper library.
  2. You’ll need a working developer setup of Riak 0.8 or later. If you have trouble installing, please ask for help on the mailing list.
  3. Some of the specs are failing on Ruby 1.9.

Known Issues

  1. The object-mapper library is incomplete. Most notably missing are associations, which is first on the list to be completed. Work-in-progress is available in the associations branch.
  2. Using a streaming all finder on a Ripple::Document when using the curb backend will render the client unusable because it attempts to request the key reusing the Curl::Easy handle that is doing the streaming. This also affects Riak::Bucket#keys with a streaming block, if the user decides to make requests to the server based on the yielded key.

Roadmap and future directions

The heat really turned up this week, partly thanks to my blog posts over the weekend and the changelog podcast, so I felt compelled to release in an incomplete state. In addition to addressing the known issues above, these features are on the docket (all can be seen on the Github issues tracker):

  1. Identity cache for buckets and keys – think ActiveRecord’s query cache and you’ll know what I mean
  2. ActiveSupport::Cache::Store implementation. This is mostly completed in a branch.
  3. ActionController session store implementation. Just like the cache store, this should be simple to complete.
  4. Wide-coverage integration tests and a testing harness. Some cucumber stories would fit the bill here.
  5. Support parallel backends like Curl::Multi or Typhoeus.

Thanks!

I really enjoyed building this and I hope you enjoy using it in your next Ruby project! Contributions are welcomed!

© 2006-present Sean CribbsGithub PagesTufte CSS