Frage

Wir brauchen eine In-Memory-Datenstruktur / DB Server mit folgenden Eigenschaften:

  1. Stand-alone-Server : wird auf der gleichen Maschine wie die Clients laufen, so dass jede Art von IPC ist ok
  2. sequenzieller Zugriff : get next/previous key
  3. zwei Tasten (string) pro Datensatz : Art eines bidirektionalen Karte, eigentlich
  4. In-Memory nur : sollte für keine Ausdauer haben Option bei allen
  5. RAM-Disk / tmpfs Lösung nicht wünschenswert ist,
  6. SQL / ODBC ist eine Option, wenn auch nicht erforderlich
  7. Handelsprodukt ok, wenn der OEM-Lizenz Preis angemessen ist

Bisher haben wir die folgenden Optionen in Betracht gezogen, aber keine befriedigende Lösung noch:

  • mysql : beantwortet alle Anforderungen, aber jetzt noch beantworten, wie viel eine OEM-Lizenz kostet
  • Memcached, cassandra : kein sequenzieller Zugriff, nach Online-Dokumentation
  • Redis : scheint, als ein schönes Werkzeug, aber auch hier sehe ich nicht get nex/prev bekommt in der Spezifikation
  • Postgres : kann es nicht gut auf Linux funktioniert / ODBC

Es scheint, dass alle nosql In-Memory-DBs Zugang Direkt bietet durch Schlüssel, Hash-Tabellenformat. Haben nicht geprüft Apache Derby noch.

Wir laufen auf Linux, der Client ist in C ++.

Wird gerne Ihre Vorschläge haben. Dank!

EDIT: Es scheint, dass wir die wird verfolgt mysql Option haben wir einen angemessenen Preis Angebot bekam, und es wird auch als unsere nützlich sein (persistent ) DB. Danke für alle Antworten, ist es wie üblich schwierig nur einen auszuwählen.

War es hilfreich?

Lösung

I'd suggest Kyoto Cabinet, it has an in memory function and sequential access.

edit: what's wrong with stl map?

Andere Tipps

I'd have a look at SQLite, with the database file name set to ":memory:" this will create an in memory database that will no longer exist when your application closes.

It is public domain so that there is no issue with licensing

FastDB should work just fine. It supports in-memory configuration and shared access.

Redis doesn't sort keys, but it does have lists/sets which allow you to retrieve items in order. It's hard to know for sure if that would work without knowing why you want sequential access, but with NoSQL you often need to think a little differently about the data structures you use.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top