Demo lightbend / typesafe configuration library #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on #17
This is a simple example of how Misq might use the typesafe / lightbend library (~295Kb) to load all global and sub-module configurations from a single misq.conf file.
Dependency constraint added to common-platform's build.gradle
Dependency (implemention) declared in common and network build files.
Global misq.conf file added to common module's resource folder (might need to move it). This sample configuration contains a network service sub config, but only the "networkIOPool {}" block has real values.
Added new MisqConfig class to load misq.conf, and provide a getConfig(String path) method to give any object a typesafe Config instance of any scope: from global, to library, down to smallest grouping of scalar configuration values.
Added test to check "networkIOPool" config is loaded with correct values.
Replaced hard-coded NETWORK_IO_POOL parameters with values loaded from misq.conf
TODO
The typesafe library can probably support everying Misq will need in terms of configuration, including the ability to merge distinct dev and production configs (sub-module level), as well as property files and json files into a global config.