简体   繁体   English

东京内阁和京都内阁有什么区别?

[英]What is the difference between Tokyo Cabinet and Kyoto Cabinet?

FAL Labs has multiple Tokyo products and Kyoto products: FAL Labs拥有多种东京产品和京都产品:

  • Tokyo Cabinet and Kyoto Cabinet are both lightweight database libraries . Tokyo Cabinet和Kyoto Cabinet都是轻量级数据库库
  • Tokyo Tyrant and Kyoto Tycoon are both lightweight database servers ... Tokyo Tyrant和Kyoto Tycoon都是轻量级数据库服务器 ......

Can someone explain the difference between Tokyo and Kyoto products? 有人可以解释东京和京都产品之间的区别吗?

Tokyo Cabinet is more complete and stable, Kyoto is too fresh yet (today is Dec 8 2010) and has some issues. 东京内阁更加完整和稳定,京都太新鲜了(今天是2010年12月8日)并且有一些问题。 Kyoto, written in C++, is (much) more simple than Tokyo (written in C), but this simplicity let some gap. 京都,用C ++编写,比东京(用C语言写)更简单,但这种简单性有一些差距。 The performance of Kyoto is a little bit worse than Tokyo, but works better with threads (at least the documentation promises that). 京都的表现比东京稍微差一点,但是对于线程来说效果更好(至少文档承诺如此)。

From the official documentation: 从官方文档:

<< In 2007, Tokyo Cabinet was developed as the successor to QDBM on the following purposes. << 2007年,东京内阁被开发为QDBM的继承者,其目的如下。 They were achieved and Tokyo Cabinet could replace conventional DBM products. 它们已经实现,东京内阁可以取代传统的DBM产品。

(...) (......)

In 2009, Kyoto Cabinet was developed as another successor to QDBM. 2009年,京都内阁成为QDBM的另一个继承者。 Compared with the sibling product (Tokyo Cabinet), the following advantages were pursued. 与兄弟产品(Tokyo Cabinet)相比,追求以下优点。 However, the performance of Tokyo Cabinet is higher than Kyoto Cabinet, at least in single thread operations. 然而,东京内阁的表现高于京都内阁,至少在单线程运营中。 >> >>

I used both, but I still prefer Tokyo, because I had a problem with Kyoto: In Kyoto Cabinet Database using File Hash Database, how can avoid file size increasing? 我用过这两个,但我还是喜欢东京,因为我在京都有问题: 在使用文件哈希数据库的京都内阁数据库中,如何避免文件大小增加? and no one was able to help me. 并没有人能够帮助我。 I still don't know how to solve that. 我还是不知道如何解决这个问题。

In my personal experience, I found Kyoto easier to compile and install, and also easier to use. 根据我的个人经验,我发现京都更容易编译和安装,也更容易使用。 I had big problems with Tokyo library dependences and problems to link the native library with the Java interface. 我对东京库的依赖性和将本机库与Java接口链接起来的问题存在很大问题。 With Kyoto everything was good and works fine in the first attempt. 在京都,一切都很好,第一次尝试也很好。 But, as I said before, I feel more control over the database using Tokyo. 但是,正如我之前所说,我觉得使用东京可以更好地控制数据库。

Tokyo Cabinet and Tyrant are LGPL and written in C. Kyoto Cabinet and Tycoon are GPLv3 and written in C++. 东京内阁和暴君是LGPL并用C语写。Kyoto Cabinet和Tycoon是GPLv3并用C ++编写。

Kyoto Tyrant supports expired records in memory, so it can replace memcached. Kyoto Tyrant支持内存中的过期记录,因此它可以替换memcached。

The developer says Kyoto* isn't successor of Tokyo*, but it's just a marketing strategy; 开发商称京都*不是东京*的继承者,但它只是一种营销策略; if you're not gonna develop a commercial product, use Kyoto. 如果你不打算开发商业产品,请使用京都。 It's newer and better. 它更新更好。

And I suggest you to read the developer's blog (both Japanese and English]) and read header files carefully (if you're gonna use the library). 我建议你阅读开发者的博客(包括日语和英语)并仔细阅读标题文件(如果你要使用这个库)。

Good luck. 祝好运。

The most important difference between the two in regard to my use cases is that TC has a "table database" while KC has not. 两个关于我的用例的最重要的区别是TC有一个“表数据库”,而KC没有。

Yes, you can serialize arbitrary data to string and store it as item value, but then you either cannot search by value at all, or need to iterate over the whole dataset and deserialize each item, or reinvent the wheel and manually index the data. 是的,您可以将任意数据序列化为字符串并将其存储为项目值,但是您要么根本不能按值搜索,要么需要遍历整个数据集并反序列化每个项目,或者重新发明轮子并手动索引数据。

Tokyo Cabinet's TDB provides excellent query capabilities for nested data (indexes, numeric and string comparison, even regular expressions within "fields"). Tokyo Cabinet的TDB为嵌套数据提供了出色的查询功能(索引,数字和字符串比较,甚至是“字段”中的正则表达式)。 The Kyoto thing is just a KV store; 京都的东西只是一家KV商店; TC is also a powerful document-oriented database. TC也是一个功能强大的面向文档的数据库。

另外,根据测试我所做的,京都的协议只是基于HTTP - 更开放,但比东京的二进制协议慢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM