At the moment usage and history is saved in HKEY records in following way:
1) usage records are stored in HKEY with key pointed in ACTIVE_USAGE_INFO record of application settings, with keys as addresses and JSON serialized time of last usage.
2) history records are stored in HKEY with key pointed in HISTORY_USAGE_INFO record of application settings, with keys as addresses and JSON serialized records (list) of every change
Implemented storages have several downsides:
In usage storage:
1) usage history storage stores only last change
2) search in storage has low performance O(N)
3) atomic operations are impossible - concurrent writing in storage could result in data losing
In history storage:
1) atomic operations are impossible - concurrent writing in storage could result data losing (need to extract and pack json structure).
At the moment usage and history is saved in HKEY records in following way: 1) usage records are stored in HKEY with key pointed in ACTIVE_USAGE_INFO record of application settings, with keys as addresses and JSON serialized time of last usage. 2) history records are stored in HKEY with key pointed in HISTORY_USAGE_INFO record of application settings, with keys as addresses and JSON serialized records (list) of every change
Implemented storages have several downsides: In usage storage: 1) usage history storage stores only last change 2) search in storage has low performance O(N) 3) atomic operations are impossible - concurrent writing in storage could result in data losing
In history storage: 1) atomic operations are impossible - concurrent writing in storage could result data losing (need to extract and pack json structure).