| ID | product.device_management.registry_service.twin_store |
|---|---|
| Description | Desired / reported state per device. |
| Key | twin_store |
| Type | component:database |
| Team | Device Management |
| Owner | device-mgmt@iotgateway.example |
| Status | active |
| Technologies | PostgreSQL |
| Attributes | store: PostgreSQL (JSONB), versioned: true |
| Tags |
The Twin Store holds the device twin: the desired state operators want a device to be in, and the reported state the device last confirmed. Reconciling the two is how configuration safely reaches devices that are only intermittently connected.
Optimistic concurrency
Every twin carries a monotonic version. Desired-state writes must present
the expected version (If-Match); a mismatch is rejected so two operators
cannot silently overwrite each other.
Desired and reported properties are stored as JSONB key/value rows so the twin
schema can evolve without migrations. Each version bump is recorded in
TWIN_HISTORY for audit. The ERD is embedded on the Overview tab.
A desired property is written and the twin version is bumped.
On its next connection the edge agent pulls desired properties newer than what it has applied.
The device writes back reported values; when reported matches desired the property is considered converged.
1 outgoing link · 1 workflow
| Target object | Label | Link type | Relation | Raw id | Required | Description | |
|---|---|---|---|---|---|---|---|
Device Repository example-iot.product.device_management.registry_service.device_repo component:database | stores twins in | — | links | product.device_management.registry_service.device_repo | — | — |
| Workflow | Model | Participant id | Participant label |
|---|---|---|---|
| Device provisioning device-lifecycle.provisioning | example-iot | product.device_management.registry_service.twin_store | Twin store |