A random question here. #clojure but not really language-based.
I want to store my web application's state in a file, it's a file that won't be touched too much and I'm thinking about using just a file. (edn, but could be a json file).
The thing here is if two users change that state at the same time I can destroy the file... and... ugh
I think I'm looking for a way to swap! an atom and automatically persist it to file in the same call.
Any simple way to make that?