I started adding LMDB to astrid last week. It’ll replace redis as a session store. It might also replace the redis buffer queue, too. I’d prefer that rendered buffers were available for any other process to sample from if they feel like it. Probably the same backend can be used for the internal sampler too, I’d think.
LMDB has some nice features for my use case:
- Reads never block
- Databases can be opened by any process with just a well-known name
- Writes are already thread-safe, too.
- Redis actually switched to using it as a backend a while ago because it’s fast and reliable. Debian uses it instead of Berkeley DB, too.
Those last bits just make me feel satisfied it’s probably not going away soon and might remain fairly API-stable.
As a side-effect, I’m finally getting around to placing some of astrid’s
temp files into XDG directories. At the momennt it’s just dumping
everything into /tmp lol.
To start, I’m putting all the LMDB databases into the XDG data directory
(XDG_DATA_HOME) inside an astrid-instruments
directory. Each instrument creates its own directory named after itself.
On my system that ends up being
$HOME/.local/share/astrid-instruments/pulsar for the pulsar
instrument I’m working on.