Hi all,
I'm currently trying to find a way to save data to and load data from the local disk atomically so as to avoid corruption in the event of a loss of power. I'm running mango 2.8.6 on Windows. Everything is done on localhost so there's no remote access of any kind, I just need some way to store and retrieve the results of tests. As javascript doesn't have a way of writing files transactionally that I'm aware of, the only solution I can think of is to send the data to a python script, which will do the file writes, but I'm not sure how to call a python script using an ajax request in my mango script. I should also note that these file writes will have to happen fairly regularly (~every minute).
Lastly, if this isn't a good way to achieve what I want should I instead use the H2 database? If so, I'm having trouble connecting to it. Do I need to change the blank username and password in env.properties file? The sql console works but the sql datasource isn't working for me. I'd also be interested to know how to query and publish to the sql database from code so that I can save and retrieve files, thanks.