This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| .. | |||
| |
README.txt | Thu Feb 26 22:31:09 -0800 2009 | |
| |
cabcore.rb | Sun Oct 11 14:52:04 -0700 2009 | |
| |
cabinet/ | Tue Oct 13 05:45:54 -0700 2009 | |
| |
error.rb | Mon Apr 06 07:12:00 -0700 2009 | |
| |
ntyrant.rb | Tue Feb 24 21:03:11 -0800 2009 | |
| |
ntyrant/ | Tue Oct 13 07:55:58 -0700 2009 | |
| |
tabcore.rb | Tue Oct 13 17:08:34 -0700 2009 |
lib/rufus/edo/README.txt
= Rufus::Edo wrapping Hirabayashi-san's 'native' ruby bindings into a rubiyst-friendly set of Ruby classes. In order to use Rufus::Edo, you have to have the libtokyocabinet dynamic library installed on your system : http://openwferu.rubyforge.org/tokyo.html Then you can install the 'native' C bindings. NOTE : I have only tested those native bindings with Ruby 1.8.6. To run them with JRuby, the best option is Rufus::Tokyo and its FFI bindings. NOTE : the Ruby tyrant library provided by Hirabayashi-san is not a C binding, it's a pure Ruby connector. It is slower than Rufus::Tokyo::Tyrant and Rufus::Tokyo::TyrantTable, but the advantage is that there is no need to install cabinet and tyrant C libraries to connect your Ruby code to your Tokyo Tyrant. == installation of the 'native' C bindings === Careo's mirror gem sudo gem install careo-tokyocabinet --source http://gems.github.com === directly from http://sf.net/tokyocabinet Get the tokyocabinet-ruby package at : http://sourceforge.net/project/showfiles.php?group_id=200242 unpack it : tar xzvf tokyocabinet-ruby-1.20.tar.gz cd tokyocabinet-ruby-1.20 and then, as described at : http://tokyocabinet.sourceforge.net/rubydoc/ ruby extconf.rb make sudo make install == Rufus::Edo::Cabinet require 'rufus/edo' # sudo gem install rufus-tokyo db = Rufus::Edo::Cabinet.new('data.tch') db['a'] = 'alpha' # ... db.close == Rufus::Edo::Table require 'rufus/edo' db = Rufus::Edo::Table.new('data.tct') db['customer1'] = { 'name' => 'Taira no Kyomori', 'age' => '55' } # ... db.close == tyrant Hirabayashi-san's pure Ruby gem for accessing Tokyo Tyrant can be installed with : sudo gem install careo-tokyotyrant --source http://gems.github.com It's also available at : http://sourceforge.net/project/showfiles.php?group_id=200242 http://github.com/careo/tokyotyrant-ruby == Rufus::Edo::NetTyrant Note : 'NetTyrant' instead of 'Tyrant' to clearly show that this class isn't a C binding but a simple [pure Ruby] network implementation of a connection to a Tyrant. require 'rufus/edo/ntyrant' db = Rufus::Edo::NetTyrant.new('127.0.0.1', 45000) db['a'] = 'alpha' puts db['a] # => 'alpha' db.close == Rufus::Edo::NetTyrantTable require 'rufus/edo/ntyrant' t = Rufus::Edo::NetTyrantTable.new('127.0.0.1', 44502) t['client0'] = { 'name' => 'Heike no Kyomori', 'country' => 'jp' } t.close







