Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lightweight B-tree library for Java? [closed]

Can anyone recommend a lightweight, fast, and hopefully stable B-tree (or similar) library for Java?

Essentially I'm looking for an on-disk map; something along the lines of BerkeleyDB JE, except I don't need transactions, am fine with read-only concurrency, and need it to be about 1/10th the size (BSD or Apache license would be nice, too).

Needs to be pure-Java, so no Tokyo/Kyoto Cabinets.

Implementing relevant Collections interfaces would be a plus (alternatively, templated interfaces for primitive types would be nice too).

JDBM looks pretty good, but it seems to have been abandoned in 2005 (at 1.0, no less).

There's also DiskBackedMap, but they released an alpha a year ago, and nothing since.

Anything else out there? Or any experiences with the above-mentioned ones?

Things I'm NOT looking for:

  • In-process relational DBs (so no H2, Derby, SQLite, etc)
  • Distributed key-value stores (no Redis, Memcachedb, Cassandra, Voldemort, Dumbledore, or whatever)
like image 805
Dmitri Avatar asked Mar 23 '11 19:03

Dmitri


2 Answers

There is a fork of JDBM that might be of interest to you.

See http://www.kotek.net/blog/jdbm_2.1_and_beyond

GitHub: https://github.com/jankotek/JDBM3

Also,

Email: [email protected]

Web: http://groups.google.com/group/jdbm

RSS: http://groups.google.com/group/jdbm/feed/rss_v2_0_msgs.xml

EDIT:

JDBM4 was renamed to MapDB

like image 145
Dilum Ranatunga Avatar answered Sep 28 '22 18:09

Dilum Ranatunga


Modern projects worth mentioning:

  • LMDBJava allows to use LMDB from Java. LMDB is not exactly B-tree, but it's a tree-like structure, i. e. always sorted.
  • If you don't the sorted property, Chronicle Map is the most efficient random-access unordered persisted off-heap key-value store for Java now
like image 44
leventov Avatar answered Sep 28 '22 17:09

leventov