Redis datastructures using Cassandra.
Installation
$ gem install redi2casa
Configuring cassandra
You need to install cassandra-2.0.x (please follow these instructions, https://gist.github.com/vireshas/7462447)
From the cloned location execute:
cqlsh -f cqlsh_cmds --debug
cassandra-cli -k redi2casa -f cassandra_cli_cmds
Usage
require "redi2casa"
r = Redi2casa.new ["localhost"], 'redi2casa'
Available: [hset, hget, hincrby, lpush, ltrim, lpop, lrange, rpush, rpop]
You should be passing an extra param(hash) when you call hget to retrieve a hash
r.hset "a", "b", "hello_world"
r.hget "a", "b", "hash" #the last parameter is needed at the moment
You can find more examples here: https://gist.github.com/vireshas/99bc322cf0ac42fbf7ee
Contributing
- 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