Every mintute I want to save some data incase of shutting down. the data is very small (words).
Notes:
- The file I save on, is writen concurrently, and Alot.
Each thread will write something and then wont stop change it. Every new thread will add more text and change it’s text too. - most of what I write to it will be small words like addresses.
- I need a good way of pulling out that information from the file in the best way. DB will be good but some programers say its for very big information only.
- I dont care if the file’s size.
- I dont care about how much files I will have.
Thanks.
You could use a text file, you would have to make sure the file gets closed as the program shuts down. If you intend to keep adding to the file then you would have to figure out a way to roll the file to another as it grows, this it not trivial. Or you can just use something like SqLite which is a small footprint database and you won’t have any trouble.