3 ms·
Licensing is a key issue. BerkeleyDB is AGPL and was previously under another strong copyleft license, neither of which could you embed in a commercial product
by SomeCallMeTim 13y ago
Licensing is a key issue. BerkeleyDB is AGPL and was previously under another strong copyleft license, neither of which could you embed in a commercial product without paying.
Kyoto Cabinet is also GPL. Again, no-go for a commercial product.
TOKYO Cabinet, on the other hand, is LGPL, so it at least CAN be embedded, but it's described as inferior to Kyoto. [1]
Regardless, if you want something to embed, it's not always easy when you have a huge pile of source with a build system that doesn't match your own. Another feature they describe is that the entire code base comes as a massive (1.3Mb) C file with no dependencies. That's a big win for "drop in the project and build."
Not making any claims for how good this particular library is, but at least it would be marginally interesting if I wanted a persistent key-value store in an app. The other go-to option is SQLite, which has a similar massive C file for easy embedding (and an even more permissive license: "Released to the Public Domain"), but SQLite's code is 4.8Mb. Size does matter, so SQLite needs to offer me some advantage to justify its size. The data I store in most apps locally doesn't require JOINs.
[1] http://fallabs.com/tokyocabinet/ http://fallabs.com/tokyocabinet/
- epo 13y agoWell commented C code should be huge! To say that "size does matter" and only mention source code size is ... Well, I shall be charitable and assume you are having a bad day.
- SomeCallMeTim 13y agocloc can answer the question definitively: $ cloc sqlite3.c 1 text file. 1 unique file. 0 files ignored. http://cloc.sourceforge.net v 1.58 T=2.0 s (0.5 files/s, 70228.0 lines/s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- C 1 9585 46745 84126 ------------------------------------------------------------------------------- $ cloc unqlite.c 1 text file. 1 unique file. 0 files ignored. http://cloc.sourceforge.net v 1.58 T=0.5 s (2.0 files/s, 119944.0 lines/s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- C 1 314 18670 40988 ------------------------------------------------------------------------------- SQLite seems to have more verbose comments, but still has more than 2x the lines of code. If you want to build both on the same platform and compare binary size, be my guest.