sirdb
sirdb copied to clipboard
Roadmap, acidity and transactions: consider this
https://danluu.com/deconstruct-files/
Moving towards ACID is interesting.
Some ideas
- use fdatasync and crash if it errors
- provide an option to check the consistency of the database (check all records against their table's schemas)
- add an error check to each record, being a hash of the record string, with our without the hash slot present, with an option to add a check to every field of the record, by adding a hash for every field of the record, as well
Also consider copy on write mode
https://nodejs.org/api/fs.html#fs_file_copy_constants
https://levelup.gitconnected.com/how-to-create-a-copy-on-write-clone-of-a-file-in-node-js-443cfa2b18d9
And ...
https://www3.physnet.uni-hamburg.de/physnet/Tru64-Unix/HTML/APS33DTE/DOCU_009.HTM#:~:text=Synchronized%20I%2FO%20is%20useful,of%20data%20on%20that%20device.