Tokyo TyrantOK, start installing Tokyo Tyrant, following the instruction at http://tokyocabinet.sourceforge.net/tyrantdoc/. It's a database management server for concurrent and remote access to Tokyo Cabinet database. Its features include hot backup, update logging, and replication.
Download the source at http://tokyocabinet.sourceforge.net/tyrantpkg/tokyotyrant-1.1.33.tar.gz. Did
> tar xzvf tokyotyrant-1.1.33.tar.gz > cd tokyotyrant-1.1.33/ > ./configure > make > sudo make install
Success. Ran ttserver
> ttserver 2009-08-20T15:25:34+09:00 SYSTEM --------- logging started [4180] -------- 2009-08-20T15:25:34+09:00 SYSTEM server configuration: host=(any) port=1978 2009-08-20T15:25:34+09:00 SYSTEM opening the database: * 2009-08-20T15:25:34+09:00 SYSTEM service started: 4180 2009-08-20T15:25:34+09:00 INFO timer thread 1 started 2009-08-20T15:25:34+09:00 INFO worker thread 1 started 2009-08-20T15:25:34+09:00 INFO worker thread 2 started 2009-08-20T15:25:34+09:00 INFO worker thread 3 started 2009-08-20T15:25:34+09:00 INFO worker thread 4 started 2009-08-20T15:25:34+09:00 INFO worker thread 5 started 2009-08-20T15:25:34+09:00 INFO worker thread 6 started 2009-08-20T15:25:34+09:00 INFO worker thread 7 started 2009-08-20T15:25:34+09:00 INFO worker thread 8 started 2009-08-20T15:25:34+09:00 SYSTEM listening started
OK. While the server is still up, ran
> make check
Got
#================================================================ # Checking completed. #================================================================
at the end on terminal. OK.
The author of Tokyo Tyrant, Mikio HIRABAYASHI wrote a blog about it here (in Japanese). Launched a TT server
> ttserver '/tmp/caskettch#num=1000' 2009-08-21T15:08:08+09:00 SYSTEM --------- logging started [5714] -------- 2009-08-21T15:08:08+09:00 SYSTEM server configuration: host=(any) port=1978 2009-08-21T15:08:08+09:00 SYSTEM opening the database: /tmp/casket.tch#bnum=1000 2009-08-21T15:08:08+09:00 SYSTEM service started: 5714 2009-08-21T15:08:08+09:00 INFO timer thread 1 started 2009-08-21T15:08:08+09:00 INFO worker thread 1 started 2009-08-21T15:08:08+09:00 INFO worker thread 2 started 2009-08-21T15:08:08+09:00 INFO worker thread 3 started 2009-08-21T15:08:08+09:00 INFO worker thread 4 started 2009-08-21T15:08:08+09:00 INFO worker thread 5 started 2009-08-21T15:08:08+09:00 INFO worker thread 6 started 2009-08-21T15:08:08+09:00 INFO worker thread 7 started 2009-08-21T15:08:08+09:00 INFO worker thread 8 started 2009-08-21T15:08:08+09:00 SYSTEM listening started 2009-08-21T15:08:45+09:00 INFO connected: 127.0.0.1:53669 2009-08-21T15:08:45+09:00 INFO doing vanish command 2009-08-21T15:08:45+09:00 INFO connection finished 2009-08-21T15:09:01+09:00 INFO connected: 127.0.0.1:53670 2009-08-21T15:09:01+09:00 INFO connection finished
and tested in another terminal
> tcrtest write localhost 1000 <Writing Test> host=localhost port=1978 cnum=1 tout=0 rnum=1000 nr=0 rnd=0 ......................... (00000100) ......................... (00000200) ......................... (00000300) ......................... (00000400) ......................... (00000500) ......................... (00000600) ......................... (00000700) ......................... (00000800) ......................... (00000900) ......................... (00001000) record number: 1000 size: 40512 time: 0.091 ok
and for read,
> tcrtest read localhost <Reading Test> host=localhost port=1978 cnum=1 tout=0 mul=0 rnd=0 ......................... (00000100) ......................... (00000200) ......................... (00000300) ......................... (00000400) ......................... (00000500) ......................... (00000600) ......................... (00000700) ......................... (00000800) ......................... (00000900) ......................... (00001000) record number: 1000 size: 40512 time: 0.087 ok
TT(Tokyo Tyrant) supports memcached and http interface as well.
If working locally, various utilty commands like tctmgr can be used to manipulate Tokyo Cabinet databases.
• Wrote Teru at 14:28 (edited 5×, last on 21 Aug 2009) | read 45× | Add comment