Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Key-Value Database with Java client

I basically want to store a hashtable on disk so I can query it later. My program is written in Java. The hashtable maps from String to List.

There are a lot of key-value stores out there, but after doing a lot of research/reading, its not clear which one is the best for my purposes. Here are some things that are important to me.

  1. Simple key-value store which allows you to retrieve a value with a single key.
  2. Good Java client that is documented well.
  3. Dataset is small and there is no need for advanced features. Again, I want it to be simple.

I have looked into Redis and MongoDB. Both look promising but not ideal for my purposes. Any info would be appreciated.

like image 760
well actually Avatar asked Dec 18 '25 17:12

well actually


2 Answers

If your dataset is small and you want it to be SIMPLE. why don't you serialize your hashmap to a file or rdbms and load it in your application?

How do you wan't to "query" your hashmap? key approximation? value 'likeness'? I don't know, seems overkill to me to mantain a keyvalue storage just for the sake of.

like image 187
Mauricio Avatar answered Dec 21 '25 06:12

Mauricio


What you are looking for is a library that supports object prevalence. These libraries are designed to be simple and fast providing collection like API. Below are few such libraries that allow you to work with collections but behind the scenes use a disk storage.

  1. space4j
  2. Advagato
  3. Prevayler
like image 39
Aravind Yarram Avatar answered Dec 21 '25 06:12

Aravind Yarram



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!