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


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Nosql数据库原理是指非关系型数据库的设计和工作原理。与传统的关系型数据库不同,Nosql数据库采用了不同的数据存储模式和查询方法。 Nosql数据库的原理可以从CAP原则和BASE原则两个方面来理解。根据CAP原则,无法同时满足一致性(Consistency)、可用性(Availability)和分区容错性(Partition tolerance)这三个原则。因此,在Nosql数据库的设计中,需要根据具体需求选择兼顾其中两个原则的策略。这也是为什么Nosql数据库常常以牺牲一致性来换取可用性和分区容错性的原因。 另外,Nosql数据库还遵循BASE原则,即基本可用(Basically Available)、软状态(Soft state)和最终一致性(Eventual consistency)。这意味着在Nosql数据库中,数据的一致性是在一定时间范围内最终达到的,而不需要实时保持一致性。这种设计方式可以提高数据库的可用性和性能,适用于大规模分布式系统的需求。 总结来说,Nosql数据库的原理包括根据CAP原则选择合适的策略以及遵循BASE原则实现基本可用性和最终一致性。这些原理通过采用不同的数据存储模式和查询方法,使得Nosql数据库能够更好地满足大规模分布式系统的需求。 <span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [Nosql数据库原理学习CAP原理、BASE和最终一致性](https://blog.csdn.net/master_hunter/article/details/108816426)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [《NoSQL数据库原理》第一章 绪论](https://blog.csdn.net/weixin_43717681/article/details/108784072)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值