Tokyo Cabinet, Tokyo Tyrant and Rufus Tokyo in Ubuntu from Github
Blog ยป Tokyo Cabinet, Tokyo Tyrant and Rufus Tokyo in Ubuntu from Github
Posted on 1247070143|%A: %d %B, %Y|agohover
After reading the performance of Tokyo Cabinet, it was necessary to try it. It's easy to install it and try it in Ruby:
Hint: CTRL+SHIFT+V pastes in Ubuntu terminal. You can paste the code from web pages.
Install Tokyo Cabinet and Tokyo Tyrant from Github:
cd /usr/local/src
git clone git://github.com/clement/tokyo-cabinet.git
git clone git://github.com/etrepum/tokyo-tyrant.git
cd tokyo-cabinet/
./configure
make
sudo make install
cd ..
cd tokyo-tyrant/
./configure
make
sudo make install
Those instructions are similar to that of Openwferu but, at least today, clement is more up-to-date then etrepum.
Then install the Ruby interface
sudo gem install rufus-tokyo
Fire your irb and play with the examples
For example,
require 'rubygems' require 'rufus/tokyo' db = Rufus::Tokyo::Cabinet.new('data.tch') db['nada'] = 'surf' p db['nada'] # => 'surf' p db['lost'] # => nil db.close
Check also On the Way to Faster, Bigger Rails Applications
If you like this page, please spread the word:
As well as commenting here, you can tweet or email to me
Add a new comment







