unlhcc / HCCGo

A GUI application for submitting and managing jobs at the Holland Computing Center
5 stars 4 forks source link

HCCGo Application Data Folder #27

Closed adamfitzgibbon closed 7 years ago

adamfitzgibbon commented 8 years ago

Data is needed to be stored outside of the project folder so that the application can be updated without refreshing any stored data (specifically for job history)

jerroddixon commented 8 years ago

https://github.com/nwjs/nw.js/wiki/save-persistent-data-in-app I was looking at this for some configuration settings storage. Think this'd help you too? Whatever 'out-of-app' storage is used should probably be shared by everything.

adamfitzgibbon commented 8 years ago

Yeah this could be an option, I guess I should have looked more into what node supported before making my own thing. On login I create an Application Data folder in a certain path based on the OS, so if you want to store config settings you can use the same folder. Once I finish off the job history tasks as specified in the pull request, we should be able to pull in the changes so you can get those too.

jerroddixon commented 8 years ago

Hey, that could work for me. Especially for configuration, don't exactly need a full database to store everything

adamfitzgibbon commented 8 years ago

Yeah, that makes sense.

djw8605 commented 8 years ago

Can someone create a service to abstract some of this logic away? I can forsee a few api calls aready:

getFile() -> returns filedescriptor (or whatever) ...

This way, everything can be stored in the same directory, but the logic is all inside a service (like connection service) that can be shared between many controllers.

adamfitzgibbon commented 8 years ago

I made a service in the clusterLanding controller, is it better to have them separate from the controller?

adamfitzgibbon commented 8 years ago

Currently I think it supports getFilePath() -> jobhistory.json path and getDataPath() -> path to folder I believe.

djw8605 commented 8 years ago

i think the service should be in it's own module, much like ConnectionService.

adamfitzgibbon commented 7 years ago

This was also addressed at some point.