We need an in-memory data structure / DB server with following characteristics:
- stand-alone server: will run on the same machine as the clients, so any kind of IPC is ok
- sequential access:
get next/previous key - two keys (string) per record: kind of a bi-directional map, actually
- in-memory only: should have option for no persistence at all
- RAM disk/tmpfs solution is not desirable
- SQL/ODBC is an option, although not required
- commercial product ok, if the OEM license price is reasonable
So far we have considered the following options, but no satisfactory solution yet:
- mysql: answers all requirements, but now answer yet as to how much an OEM license will cost
- memcached, cassandra: no sequential access, according to online docs
- Redis: seems as a nice tool, but again, I don’t see get
get nex/previn the spec - Postgres: couldn’t make it work well on Linux/ODBC
Seems that all nosql in-memory DBs provide only direct access by key, hash-table style.
Have not checked Apache Derby yet.
We run on Linux, the client is in C++.
Will be glad to have your suggestions. Thanks!
EDIT: It seems that we will be pursuing the mysql option, we’ve got a reasonable price offer, and it will also be useful as our main (persistent) DB. Thanks for all answers, it is as usual difficult to select just one.
I’d suggest Kyoto Cabinet, it has an in memory function and sequential access.
edit:
what’s wrong with stl map?