Warm tip: This article is reproduced from serverfault.com, please click

Key-value database options

发布于 2011-12-27 13:30:54

I have looked at the key-value database Redis and am curious about alternatives that would offer the following:

  1. Instead of starting an external database engine as a separate process, and then connecting to it, e.g. via the C interface:

    redisContext *c = redisConnect("127.0.0.1", 6379);

    Is there an alternative that gives the option of including the database code as a library, and loading the data as a file within-binary? For example, given the binary myDbBinary and the command:

    $ myBinary --filter=filterOptions db.dat

    The binary myBinary would not start a separate db process and connect to its port, but, instead, myBinary loads the keys (and hashes) from the file db.dat into memory (or similar VM arrangement) which it can then filter (with filterOptions, whatever they might be) and perform key/hash lookups.

  2. C and Python interfaces to data and storage directives.

  3. Hash support, by which I mean a key maintains a hash table as a value.

Does any software like this exist?

Questioner
Alex Reynolds
Viewed
0
seppo0010 2011-12-27 21:37:36

No, Redis works as a process, not as a library. There is no way currently of doing so. You can use alternatives like Kyoto Cabinet (which is more redis-like).

Kyoto has hash tables support for C and Python.

Alternatively you can use SQLite but it's quite different than what you asked.