andyrocket8 / blacklist

Application for IP address blacklisting
0 stars 1 forks source link

Change history storage & usage storage #48

Closed andyrocket8 closed 8 months ago

andyrocket8 commented 8 months ago

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).

andyrocket8 commented 8 months ago

All done except of migrate history to streams. Motivation is in pull request description #50