What is the difference between Tokyo Cabinet and Kyoto Cabinet?
Asked Answered
C

4

24

FAL Labs has multiple Tokyo products and Kyoto products:

  • Tokyo Cabinet and Kyoto Cabinet are both lightweight database libraries.
  • Tokyo Tyrant and Kyoto Tycoon are both lightweight database servers...

Can someone explain the difference between Tokyo and Kyoto products?

Cognoscenti answered 14/11, 2010 at 16:28 Comment(0)
L
14

Tokyo Cabinet is more complete and stable, Kyoto is too fresh yet (today is Dec 8 2010) and has some issues. Kyoto, written in C++, is (much) more simple than Tokyo (written in C), but this simplicity let some gap. 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. They were achieved and Tokyo Cabinet could replace conventional DBM products.

(...)

In 2009, Kyoto Cabinet was developed as another successor to QDBM. Compared with the sibling product (Tokyo Cabinet), the following advantages were pursued. 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. 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.

Latty answered 8/12, 2010 at 18:47 Comment(4)
Hello. What else Kyoto issues have you faced?Shalondashalt
Can you inform me, is Tokyo Cabinet supports on-memory B+ Tree implementation and how to achive that ? Because in some web article I found, it supports but can't found any document telling how to do that. Sorry, for asking like this, but can't find any experienced Tokyo user help to solve this issue.Diaphony
What about now? still finding Tokyo more established than Kyoto?Truc
I don't know. I stop to use that. It would be nice if someone give us their experience.Latty
S
7

Tokyo Cabinet and Tyrant are LGPL and written in C. Kyoto Cabinet and Tycoon are GPLv3 and written in C++.

Kyoto Tyrant supports expired records in memory, so it can replace 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.

Shalondashalt answered 15/11, 2010 at 12:30 Comment(1)
Kyoto Tycoon just got a plugin exposing a memcached server. Tokyo Tyrant has the same feature minus key expiry.Roommate
T
2

The most important difference between the two in regard to my use cases is that TC has a "table database" while KC has not.

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"). The Kyoto thing is just a KV store; TC is also a powerful document-oriented database.

Thurnau answered 18/11, 2011 at 18:58 Comment(0)
S
1

Also, according to test what I did, protocol of Kyoto is only HTTP based - more open, but slower than binary protocol of Tokyo thing.

Sociality answered 7/5, 2012 at 16:12 Comment(2)
KyotoTycoon is HTTP based: not Kyoto.Gauntry
Sure. "Kyoto" means nothing. Product is called Kyoto Cabinet (lib) and Kyoto Tycoon (server)Sociality

© 2022 - 2024 — McMap. All rights reserved.