ConfigModule

Tag configuration and Routing

The ConfigModule is responsible for storing, maintaining and distributing tag configuration and tag routing information between the Cloud and all other modules running on the Field Agent.

The data pipeline in the Edge Device has 2 basic types of modules. The data collector modules, and the data distribution module. The data collector modules only need to be aware of the tag configuration that belongs to the specific module. However, the data distribution module does not beed the tag configuration, but needs to be aware of how measurements must be routes. This means that the config module stores:

  • Tag configuration: Information about tag definition, data collection, aggregation and compression.

  • Tag routes: Information about how the tag should be distributed, after collection and aggregation.

Routes define the characteristics for the distribution. A route contains the following information, that indentifies how the routing should occur:

  • RoutingInterval: Determines how often the routing should happen. If the value is zero or null, the route is activated each time a measurement is received.

  • UploadHistoryWindow: Determines the amount of data included on each routing. If the value is zero, only the most recent measurement is routes. If the value is null (not defined), all measurements arrived since last routing are routed.

There are 3 types of routes:

  • Cold path routes: Routes measurements to a storage account, for a cost effective data collection of measurements, that are not time critical.

  • Hot path routes: Routes measurements to an IoT Hub, for real-time applications.

  • Internal routes: Routes measurements to another module.

Addtionally, the configuration and routes are further divided into static and dynamic categories:

  • Static: Configuration and routes that are (close to) permanent over time

  • Dynamic: Configuration and routes that are dynamically added / removed

configuration.png

The static and dynamic configuration have been separated for optimization - for example to prevent a full reload of all configuration information each time a dynamic subscription to a custom tag is made. This means that the full configuration information stored on the edge device consists of 4 separate files:

  • staticconfig.json: Static tag configuration

  • staticroutes.json: Static route information

  • dynamicconfig.json: Dynamic tag configuration

  • dynamicroutes.json: Dynamic route information

Each data collection module that supports tag browsing, will produce a list of available tags. The available tags list will be stored in a file on the edge device, under a folder with the modules name, as this example: /modulename/availabletags.json. The file will be uploaded to the Cloud as well.

Tag configuration Services

In order for other modules to access configuration data, there are four types services that can be used to access different types of configuration data:

ConfigGlobalService: Service for accessing both static and dynamic tag configuration for all modules in general. This type of client is used for modules that needs access to configuration data across the entire system (for example the Config module itself).

ConfigModuleSerivce: Service for accessing both static and dynamic tag configuration for a single module. The service exists to limit the config information contained in memory to only enclose the relevant information for a single data collection module. T

RouteService: Service for accessing both static and dynamic routes for all modules. This type of client is used for modules that needs access routing across the entire system (for example the DataDistribution module).

AvailableTagsService: Service for reporting the available tags from a module. Used by data collection modules that support tag browsing.

Last updated

Was this helpful?