nosql數據庫學習二:Tokyo Tyrant

首先申明:這個nosql數據庫學習系列純屬是再記錄一些看到的,學到的,學術味確實很低。。。

第二個數據庫Tokyo Tyrant也是一個鍵值類型的數據庫,但是永久性存儲

推薦大家看:Tokyo Tyrant

話說kyototycoon這個數據庫也很類似:http://fallabs.com/kyototycoon/

TokyoTyrant數據庫相比於memcached,最大的有點就是可以永久存儲。

介紹Tokyo Tyrant之前,先介紹下Tokyo Cabinet鍵值存儲數據庫,該數據庫最大的缺點就是不能聯網,這是本地的數據庫,但是現在互聯網應用對數據庫的需要時那麼大,Tokyo Tyrant也就應運而生了,他是Cabinet的網絡客戶端,對其進行封裝,增加了一個互聯網的接口。所以,這就是爲什麼我在使用Tokyo Tyrant之前要先安裝Tokyo Cabinet數據庫了。

他和memcached存儲地方不同:一個是在硬盤,一個是在緩存,同時,Tokyo Tyrant還引入了數據類型的概念



數據類型不同,所以必須選擇我們採用哪種數據類型作爲存儲方式。


安裝:

可以參看:http://blog.csdn.net/pwlazy/article/details/5313405

Install the latest version of Tokyo Cabinet beforehand and get the package of Tokyo Tyrant.

When an archive file of Tokyo Tyrant is extracted, change the current working directory to the generated directory and perform installation.

Run the configuration script. To enable the Lua extension, add the `--enable-lua' option.

./configure

Build programs.

make

Install programs. This operation must be carried out by the root user.

make install

When a series of work finishes, the following files will be installed.

/usr/local/include/ttutil.h
/usr/local/include/tculog.h
/usr/local/include/tcrdb.h
/usr/local/lib/libtokyotyrant.a
/usr/local/lib/libtokyotyrant.so.x.y.z
/usr/local/lib/libtokyotyrant.so.x
/usr/local/lib/libtokyotyrant.so
/usr/local/lib/ttskelmock.so
/usr/local/lib/ttskeldir.so
/usr/local/lib/ttskelproxy.so
/usr/local/lib/ttskelnull.so
/usr/local/lib/pkgconfig/tokyotyrant.pc
/usr/local/bin/ttserver
/usr/local/bin/ttultest
/usr/local/bin/ttulmgr
/usr/local/bin/tcrtest
/usr/local/bin/tcrmttest
/usr/local/bin/tcrmgr
/usr/local/sbin/ttservctl
/usr/local/share/tokyotyrant/...
/usr/local/man/man1/...
/usr/local/man/man3/...

To test the server, perform the following command. To finish it, press Ctrl-C on the terminal.

ttserver

To test the client connecting to the above running server, perform the following command on another terminal.

make check


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章