3 ms·
I've been using (and developing a fork of) NeDB [0] that does exactly what you describe: an in-memory database with append-only logs of changes for file-system
by lioeters 8y ago
I've been using (and developing a fork of) NeDB [0] that does exactly what you describe: an in-memory database with append-only logs of changes for file-system persistence.
On startup, and optionally at regular intervals, it "compacts" the database by reducing all events to a single JSON string.
The README links to an article by @antirez, Redis Persistence Demystified [1]. It's been educational studying how it works.
[0] https://github.com/louischatriot/nedb#persistence https://github.com/louischatriot/nedb#persistence
[1] http://oldblog.antirez.com/post/redis-persistence-demystified.html http://oldblog.antirez.com/post/redis-persistence-demystifie...