Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between Tokyo Cabinet and Kyoto Cabinet?

Tags:

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?

like image 601
Chun Ku Bot Tanaka Avatar asked Nov 14 '10 16:11

Chun Ku Bot Tanaka


2 Answers

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.

like image 56
Felipe Avatar answered Sep 28 '22 00:09

Felipe


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.

like image 23
Jeff Avatar answered Sep 27 '22 23:09

Jeff