Right now our ustorage replacement at https://github.com/riptidewave93/UNVR-NAS/blob/main/overlay/filesystem/usr/bin/ustorage does all calls/lookups/rendering directly. We should move this to maybe another system service that runs every X seconds, and stashes the output. This way, when ulcmd calls ustorage it can respond almost instantly with results.
However, it needs to be considered that ulcmd learns about disk changes from this call, so we want to be reasonably quick. My thought is:
this new backend worker will scan and cache what disks are available, and then generate data, and stash it
Every X min (probably 5) regenerate disk data
Every X seconds (10 or so?) look for disk changes (specifically, did we add/lose any /dev/sd*?), and if so, invalidate cache and regenerate disk data
Right now our ustorage replacement at https://github.com/riptidewave93/UNVR-NAS/blob/main/overlay/filesystem/usr/bin/ustorage does all calls/lookups/rendering directly. We should move this to maybe another system service that runs every X seconds, and stashes the output. This way, when ulcmd calls ustorage it can respond almost instantly with results.
However, it needs to be considered that ulcmd learns about disk changes from this call, so we want to be reasonably quick. My thought is: