Is anyone aware of a practical (real-life) use of Ruby's DBM lib? Is it an alternative to more "widespread" persistent key-value stores like Redis ?
Asked
Active
Viewed 1,029 times
2 Answers
3
I've never used it, but the obvious answer is that it's part of the standard library and thereby available anywhere Ruby is. This potentially makes it very useful in a very narrow set of circumstances, i.e. when you need a key-value store but the end user is in an environment where more robust solutions aren't available, e.g. Redis can't be installed or run or there's no internet connection to download a gem.

Jordan Running
- 102,619
- 17
- 182
- 182
-
1Thanks for your answer. Why should Redis be more robust ? – Nekosan Jun 21 '12 at 18:38
-
Why should it, or why is it? For the latter, well, it just is. It has multiple value types like sets and hashes, pub/sub and, as of the latest version, Lua scripting. – Jordan Running Jun 21 '12 at 19:14
2
- DBM is a very old "standard" (there are multiple versions, see a post.)
- Software to read/write DBM is much more widespread than the much newer Redis.
If you need compatibility with some other software that uses or generates DBM, use it.
Otherwise, you're probably right to investigate newer technologies including Redis. But don't stop with Redis--you should also look into other NoSQL solutions. FindTheBest

Larry K
- 47,808
- 15
- 87
- 140
-
1Thanks. But why choose a more modern solution over DBM (btw it is not even on the link you posted) ? – Nekosan Jun 21 '12 at 18:38
-
Thanks for the check. If I didn't need compatibility with some other sw, a more modern solution is often better since the people who developed it usually are aware of the older software and want to create a better solution to the problem. It isn't always that way, but it usually is. – Larry K Jun 22 '12 at 02:36