Framework
Architecture
The functions that make up a Factory+ system, how they relate to each other and how plugin services extend them.
A Factory+ system is built from a small number of functions, each defined by its interface and its well-known UUIDs.
Between them the functions identify every participant, decide what each one may do, record what devices and services exist, hold their configuration, carry their live data and keep its history. Because each function is defined only by its interface and UUIDs, any implementation of a function can work with any implementation of the others. Plugin services extend these functions.
Principles explains why the architecture takes this shape, and the pages under Services specify each interface in detail.
Framework functions
Most functions are network services. A client finds each service by looking up its service UUID in the Directory, as described in the service specification. The other functions are roles that a component plays or conventions that participants follow, and they have no service UUID of their own.
Core functions
A complete Factory+ system provides all of the core functions.
| Function | What it does | Service UUID | Specification |
|---|---|---|---|
| Identity | Authenticates every principal. A Kerberos realm is required, and an OpenID Connect provider MAY be added for sign-in from browsers and third-party tools. | None. Clients find the Kerberos key distribution centre through their Kerberos configuration. | Principals, Authentication |
| Auth | Maps identities to principal UUIDs, holds the grants that give principals permissions on targets, and computes each principal’s effective permissions. Each service enforces these permissions itself. | cab2642a-f7d9-42e5-8845-8f35affe1fd4 | Authorisation, Auth service |
| Directory | Maps each service UUID to the URL of the service. Reads Sparkplug birth and death messages to keep a record of every device, its Sparkplug address, its schemas and whether it is online. | af4a1d66-e6f7-43c4-8a67-0fa3be2b1cf9 | Directory |
| Configuration Store | Registers every object by UUID with its class and owner, holds the class hierarchy, and stores configuration entries for each pair of application and object. | af15f175-78a0-4e05-97c0-2a0bb82b9f3b | Configuration Store, Object model |
| Command Escalation | Accepts requests to send a command to a device over HTTP, checks that the requesting principal has permission, and sends the command as a Sparkplug message. | 78ea7071-24ac-4916-8351-aa3e549d8ccd | Command Escalation |
| MQTT broker | Carries all Sparkplug and UNS traffic. Authenticates every client as a principal and allows each topic only when the client’s grants allow it. | feb27ba3-bd2c-4916-9269-79a61ebc4a47 | MQTT |
| Historian | Subscribes to Sparkplug or UNS data and stores it with its schema and instance context for reading back later. How and where it stores the data is not prescribed. | None. The historian is a role, and an implementation MAY run several historians. | Historian |
| UNS ingester | Republishes the metrics of each device whose Sparkplug birth carries an ISA-95 hierarchy. The metrics are published as JSON on Unified Namespace topics. | None. This is a role. | Unified Namespace, ISA-95 |
| Edge Agent | Reads data from devices through drivers and publishes it as Sparkplug, by exception, under its own identity. Reads its configuration from the Configuration Store. | None. Each Edge Agent is a principal in the Edge Agent class, 00da3c0b-f62b-4761-a689-39ad0c33f864. | Edge Agent, Driver protocol |
Data consumption services
These services give applications access to stored data and are optional. If an implementation offers northbound access, it SHOULD offer it through i3X, because Factory+ adopts i3X as its standard northbound interface.
| Function | What it does | Service UUID | Specification |
|---|---|---|---|
| Data Access | Lets clients define named datasets of device data and download them for a time window. | 06cee697-29d3-4972-9479-bc392e24946e | Data Access |
| i3X | Serves devices, their place in the ISA-95 hierarchy, their current values and their history through the CESMII i3X 1.0 API. | 018854a1-a312-46d3-b904-c274b59088c7 | Factory+ profile of i3X |
Plugin services
| Function | What it does | Service UUID | Specification |
|---|---|---|---|
| Files | Stores files as Factory+ objects. Each file can be classified in the Configuration Store and is protected by the same grants as everything else. | a2a6efc5-9793-4486-9fd9-7caf9e3b5451 | Files |
Well-known UUIDs lists these service UUIDs together with the classes, applications and permissions that the services define.
How the functions fit together
The diagram shows the central functions and one cell gateway at the edge. Solid lines are HTTP requests and dotted lines are MQTT messages.
graph LR
subgraph central [Central functions]
direction TB
id[Identity]
auth[Auth]
cs[Configuration Store]
dir[Directory]
ce[Command Escalation]
mqtt[MQTT broker]
hist[Historian]
uns[UNS ingester]
subgraph optional [Data consumption and plugin services]
da[Data Access]
i3x[i3X]
files[Files]
end
end
subgraph gw [Cell gateway]
direction TB
ea[Edge Agent]
d1["OPC UA driver"]
d2["Modbus driver"]
end
dev1[Machine] --- d1
dev2[Machine] --- d2
d1 <-. "fpEdge1 over local MQTT" .-> ea
d2 <-. "fpEdge1 over local MQTT" .-> ea
ea -. "Sparkplug B" .-> mqtt
ce -. "Sparkplug commands" .-> mqtt
mqtt -. "births and deaths" .-> dir
mqtt -. "Sparkplug" .-> uns
uns -. "UNS JSON" .-> mqtt
mqtt -. "Sparkplug and UNS" .-> hist
ea -- "configuration" --> cs
auth -- "principals and groups" --> cs
mqtt -- "permissions" --> auth
da -- "history" --> hist
i3x -- "history" --> hist
app[Application] -- "HTTP APIs" --> i3x
app -. "MQTT" .-> mqtt
id -. "tickets" .- ea
These dependencies between the functions matter to anyone building or starting a Factory+ system.
- Every client is configured with the URL of the Directory and the details of the Kerberos realm. Because the client finds every other service by service UUID through the Directory, the Directory URL is the only service URL it needs to know in advance.
- Principals, principal groups and composite permissions are classes in the object model. The Auth service reads them from the Configuration Store. A principal that is not a member of the Principal class in the Configuration Store has no permissions.
- Every service, including the MQTT broker, asks the Auth service for the permissions of the principal making a request and then makes its own decision. The Auth service computes permissions but does not enforce them.
- Because the Directory learns about devices from the Sparkplug births that pass through the MQTT broker, a device becomes visible to consumers as soon as it publishes its birth.
- An Edge Agent asks the Auth service for its own principal UUID. It reads two entries from the Configuration Store: its Sparkplug address from the Sparkplug Address application (
8e32801b-f35a-4cbf-a5c3-2af64d3debd7), and its configuration from the Edge Agent configuration application (aac6f843-cfee-4683-b121-6943bfdf9173). It then publishes its data to the MQTT broker. - If an application wants a device to act, for example to rebirth, it asks Command Escalation rather than publishing a Sparkplug command itself, and every command is then checked against the requester’s grants.
The edge
Machines on the shop floor are connected through cell gateways. A cell gateway is a computer at the edge of the network beside the machines, and it runs an Edge Agent. The Edge Agent holds its own principal and credentials and publishes the data of the devices it serves as Sparkplug.
The Edge Agent does not talk to devices itself. Each protocol, such as OPC UA, Modbus or a vendor’s own interface, is handled by a driver. The driver connects to an MQTT broker that the Edge Agent provides on the gateway and exchanges messages with the Edge Agent under the fpEdge1 topic namespace. Because of this split, a driver for a new protocol can be written in any language, by anyone, without changes to the Edge Agent. These messages are specified by the driver protocol. The optional device discovery messages let a driver list the addresses a device offers.
Edge management is implementation-defined
The framework specifies what an Edge Agent does once it is running. That covers its identity, where it reads its configuration, the Sparkplug messages it publishes and the commands it accepts.
The framework does not specify how the Edge Agent and its drivers are installed on a cell gateway. Nor does it specify how their credentials are delivered, how they are updated or how their health is monitored. Each implementation chooses its own approach, provided the result behaves as the Edge Agent specification requires.
Plugin services
A plugin service is any service that follows the service specification and joins a Factory+ system on the same terms as the core services. The core functions provide everything a plugin needs:
- a service UUID of its own, through which clients find it in the Directory
- authentication of its clients through the shared authentication methods
- its own permissions, defined as objects in the Permission class in the Configuration Store, granted by administrators through the Auth service and checked by the plugin on each request
- storage for its own configuration as entries under its own applications in the Configuration Store
- change notification to its clients through the standard notify interface
Anyone can write a plugin service. Some plugins give access to data in a new form, and others add functions that the core does not offer. Files is a plugin service defined by the framework and stores files as objects in the Configuration Store’s object model.