Open jbartek25 opened 2 years ago
Thanks for the detailed enhancement description @jbartek25 . For the record, I only reviewed the main PBS repo for issues. Will start looking here every two weeks in prep for the committee meeting.
Anyhow, as is apparent from the lack of response, no, there is no plan to change the fetching of accounts. Community contributions are always welcome, particularly if they're configurable.
We have discussed possibly adding a mode where the server can load a large batch of account data into cache at startup before accepting requests.
@jbartek25 - discussed in committee -- we're open to contributions like this.
Hey guys,
We are using a HTTP service for fetching accounts, requests and imps. This works fine when using
HttpApplicationSettings
but requires us to either periodically call the config services on predefined TTL intervals or the backend logic has to call the cache invalidation endpoint on each change.Alternative approach is to use
HttpPeriodicRefreshService
which downloads all the config objects at the startup and then only fetches changed items on predefined interval. We like this approach more than whatHttpApplicationSettings
does but the problem is thatHttpPeriodicRefreshService
works only with requests and imps, not accounts. We could useHttpApplicationSettings
for accounts andHttpPeriodicRefreshService
for requests and imps but the downside of the approach is that we would need toHttpPeriodicRefreshService
)We looked at the code and as we see it,
HttpPeriodicRefreshService
cannot be easily extended to also fetch accounts, becauseHttpPeriodicRefreshService
usesCacheNotificationListener
which allows updating the cache directly but only supports requests and imps and it seems a rather large change to get accounts use the same caching mechanism as requests and imps.Questions:
HttpPeriodicRefreshService
?HttpPeriodicRefreshService
but instead of updating the account cache directly which is currently not possible, the cache of updated accounts would simply get invalidated and hence reloaded byHttpApplicationSettings
(or any other fetch method configured).Thanks & Regards