Riak ruby object database.
Rrod lets you use the super awesome database, riak, to model and persist your ruby objects.
First, you must make sure you have Riak installed. These guys have extremely good docs and will usually answer your questions in freenode IRC #riak. You must also make sure you have enabled Secondary Indexing for your Riak installation.
rrod to your Gemfile and run
bundle or execute
gem install rrod.
Once you have Riak and Rrod installed you can begin to play.
connect to Riak on localhost using protocol buffers on port 8087. What you
say? Don't worry about it.
Next, if you installed Rrod by adding it to your Gemfile, run
$ bundle exec rrod pry
Otherwise, if you installed using
gem install rrod, run:
$ rrod pry
This will set you up with an pry environment with
Next you will wave your magic wand and enter the following incantations:
class Person attribute :name, String, index: true attribute :age, Integer, index: true end hank = Person.new(name: "Hank", age: 40) hank.save @hank = Person.find_by name: "Hank" @hank.age # => 40
Rrod lets you have arbitrary attributes on your ruby objects and persist and
retreive them from Riak.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request