This code is the product (still in progress) of some hours spent learning Redis.
We focused on a simple problem, a book inventory app, and tried to solve it with a nosql approach, using ruby, sinatra and redis-rb.
A short summary of the code:
library.rb
works as an interface with Redis;poormenslibrary.rb
is the sinatra app that interfaces with users.
More code will come.
This code has to be intended as a rough journey in Redis peculiarities, few checks are done on the sanity of user input, so use it just as starting point to learn how to model your database using Redis.
Before using this code, you should check in your system if you have a working installation of the Redis server. After you are shure that Redis is up and running, you should install 2 gems, in order to get the library app working:
gem install sinatra gem sources -a http://gems.github.com gem install ezmobius-redis-rb
Now you are ready to taste Redis candies by issuing the command ruby poormenslibrary.rb
from the app directory.