Skip to content

How applications communicate

Kelvin provides an MQTT Broker for inter-application communication. This communication is achieved through proper channels configured by each application's configuration file.

Basic Concepts

The concept of metrics and channels are used internally to implement the logic to handle the app.yaml and translate it into the MQTT topics to publish and subscribe, the storage configuration payload and the explanation tables.

Channels and Metrics

A channel is what connects metrics between applications. In an application, a channel is represented by its endpoint way (input or output) as well as the address.
Additionally, it may have an external name as well.

The address of a channel will tell if it's a local or remote channel.
If the address points to its own node and workload, then the channel is local.
If all the channels of a metric are local, then the metric is owned by the application. A local channel can be identified by having its address point to its own node and workload.

Within an environment, only one application can own a metric. That owner is the one that will publish the storage configuration for that metric.

A metric has an internal name, that is, it is what the processing application will see. However, that name may not be what's defined in the platform. In that case, the channel may have an external name which will be used to translate the metric name at the application boundaries.

A brief example

Consider the following example featuring two air conditioner units.

The temperature of each AC is its own metric. That representation is visible on the MQTT topics, where metrics are published to .../<asset-name>/<metric-name>.

AC communication