Use a reader
Subscribe by Email
Blog » Tokyo Cabinet, Tokyo Tyrant and Rufus Tokyo in Ubuntu from Github
Posted on 08 Jul 2009 16:22
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
Then install the Ruby interface
sudo gem install rufus-tokyo
Fire your irb and play with the examples
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
If you like this page, please spread the word:
You can contact me if you have questions or corrections.