I need a way to store values persistently. The use case is storing data from a webserver, so concurrency support is necessary. I need to store an arbitrary number of strings/integers. Each string isn’t very long, although it’s not a fixed size. I guess what I need exactly would be some kind of set which is backed in file storage.
When the webserver was implemented in Node, I was using an in memory Object which I would write to disk on each update, which seemed like a bad idea at the time, but it was simple to implement. Since I’m redoing the server in Go, I was wondering what the best way to store such data is. I could implement the same thing with Go, but I am not sure that this is the best way. Would a key-value store library like Bolt be useful for this scenario? Or is using a storage backed map[string]bool fine?
Thanks for the help.