It is not uncommon for some application to have a consistent and efficient "hot reload" for configuration files. At the moment, the configuration is loaded when the create method is invoked, and no cache is implemented; so it would not be hard for a user to implement some reload mechanism from outside the API. But, things would be better if the reload is triggered by file change, transparently. This should of course be kept thread safe to avoid inconsistent states.
The problem is that if the configuration is invalid (example, a non-numeric value for a method returning a numeric value) will generate an exception when the method is invoked, a runtime exception.
So, it would be best to have the validation feature, so that when reload is triggered the validation ensures that the new configuration is valid before to adopt it; and if it's not valid then the new configuration is discarded with some log message somewhere.
At the moment the reload happens synchronously (when a method on the proxy is invoked), but it would be nice if the user could chose also an asynchronous reload (by a thread in background) with a notification mechanism based on listeners.
It is not uncommon for some application to have a consistent and efficient "hot reload" for configuration files. At the moment, the configuration is loaded when the create method is invoked, and no cache is implemented; so it would not be hard for a user to implement some reload mechanism from outside the API. But, things would be better if the reload is triggered by file change, transparently. This should of course be kept thread safe to avoid inconsistent states.
link to #5
The text was updated successfully, but these errors were encountered: