3 ms·
Is all your data on disk read-only and the data in RAM can be forgotten when your application finishes/closes? Then you don't need any of this. If your state c
by threatripper 7y ago
Is all your data on disk read-only and the data in RAM can be forgotten when your application finishes/closes? Then you don't need any of this.
If your state consists of a single data structure you could write it to disk into a new file and move-replace the old file. This works as long as you have a single instance of your application.
For anything more complex SQLite is a good way to keep your data in a consistent state. If you store it on a local drive, the performance is stellar.
Thinking about going multi-process or multi-user? SQLite can still give you an easy head-start because it performs OK in most situations with a database stored on a network drive.