Skip to main content

Edge Agent

The Edge Agent is the workhorse of Factory+, operating at the periphery, gathering data from devices, normalising it into Data Schemas, converting the packets into Sparkplug messages, and transmitting them to the MQTT Component.

Open Source Example

ACS Edge Agent Component

See how the AMRC have implemented this component in the AMRC Connectivity Stack
View on Github

Overview​

Identity
Authorisation
Identity
Authorisation
Directory
Configuration Store
Manager
Commands
Data Warehouse
MQTT
Edge Agents

Although the Edge Agent plays a crucial role in the framework there are few moving parts because all configuration is authored in the Manager Component; the Edge Agent simply follows orders.

Implementations of Edge Agents:

  • MUST conform to the Sparkplug V3 specification (i.e. they MUST utilise the Sparkplug payload model MUST publish to the correct Sparkplug topics, they MUST encode packets using Protocol Buffers and they MUST register/publish DDEATH/NDEATH and DBIRTH/NBIRTH messages).
  • SHOULD be ephemeral, immutable and idempotent
  • MUST immediately request their configuration from the Manager Component using the /api/edge-agent-config endpoint when it starts. The configuration returned will have been validated by the Manager to ensure that it conforms to the Edge Agent Configuration Schema, but Edge Agents SHOULD also validate that this is the case before they load the configuration.

Before the configuration is loaded, all sensitive information placeholders MUST be replaced with the real values, which MUST be made available to the Edge Agent at runtime.

Secret Management

The AMRC Connectivity Stack uses Kubernetes Secrets to manage sensitive information and make it available at the point of consumption.

Once the configuration has been processed, the Edge Agent:

  • MUST use the credentials in the configuration to connect to the MQTT component
  • MUST publish NBIRTH and DBIRTH messages as appropriate
  • MUST publish metrics on a report-by-exception basis, that is, only when a value has changed
  • MUST publish metric names as a slash (/) delimited string of the nested metric name (e.g. /Phases/1/Voltage), which MUST conform to the schema for the specific device
  • MUST NOT publish metrics that do not conform to a device schema
  • MUST respond to Node Control/Reload Edge Agent Config NCMDs messages, which MUST instruct the Edge Agent to fetch the latest configuration from the Manager
  • MUST respond to Node Control/Rebirth NCMDs messages, which MUST republish the NBIRTH and DBIRTH messages for the Node and all associated Devices