Atom-file - buffered concurrent access to files with async atomic commit
โ Rust ๐ 2026-03-07 ๐ค surdeus ๐๏ธ 1I have just extracted a crate from my database crate, which I think could be generally useful.
I think the documentation needs improving, to better explain what this is all about, but I am having trouble expressing the explanation. This is code I wrote a few years ago. It has quite a few quite clever features, one is that commits are done by a separate thread, another is buffering of reads ( and writes ).
Part of my explanation ( is this comprehensible? ):
โAtomic file has two maps of writes. On commit, the latest batch of writes are sent to be written to underlying storage, and are also applied to the second map in the โCommitFileโ. The CommitFile map is reset when all the updates to underlying storage have been applied.โ
Help me explain this better!
1 post - 1 participant
๐ท๏ธ Rust_feed