Multi Region Support - Loader Interface and YAML Loader
Related tasks
Context
Cloudsim is made up of platforms that interact with external services. Each platform itself is composed of several components that require configuration data to initialize. Until now, the only way to configure these components has been to setup environment variables, which has suited our purposes because we only had a single platform.
The introduction of multiple platforms (for multi-region support) requires Cloudsim to parse multiple configuration files when setting up each platform. Because environment variables only allow for a single level of configuration (without getting overly creative), a move to YAML configuration formats has been chosen.
Change
This MR introduces the Loader
interface. Loader
s are used by components to initialize configuration files. Each Loader
implementation defines the specific format the configuration should be provided in, such as environment variables, YAML, JSON, etc.
In addition to the Loader
interface, a YAML Loader
implementation is included. This implementation will be passed to components when YAML initialization is required.