SpecsModelExplore
Overview
Actors
External Systems
IoT Platform
Edge
Ingestion
Stream Processing
Device Management
Device Registry
Device RepositoryConnection State TrackerTwin Store
OTA Service
User-Facing Apps
Platform
SpecsModelExplore
Twin Store
OverviewGuideSchemaLinks and Communications
IDproduct.device_management.registry_service.twin_store
DescriptionDesired / reported state per device.
Keytwin_store
Typecomponent:database
TeamDevice Management
Ownerdevice-mgmt@iotgateway.example
Statusactive
TechnologiesPostgreSQL
Attributesstore: PostgreSQL (JSONB), versioned: true
Tags
Table of contents
Guide
Twin Store
Data model
Reconciliation
Edge syncs
Device reports
Schema

Guide

Twin Store

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.

Data model

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.

Reconciliation

Operator sets desired

A desired property is written and the twin version is bumped.

Edge syncs

On its next connection the edge agent pulls desired properties newer than what it has applied.

Device reports

The device writes back reported values; when reported matches desired the property is considered converged.

Schema

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
100%

Links and Communications

1 outgoing link · 1 workflow

Outgoing Links(1)

Target objectLabelLink typeRelationRaw idRequiredDescription
Device Repository

example-iot.product.device_management.registry_service.device_repo

component:database
stores twins in—linksproduct.device_management.registry_service.device_repo——

Related Workflows(1)

WorkflowModelParticipant idParticipant label
Device provisioning

device-lifecycle.provisioning

example-iotproduct.device_management.registry_service.twin_storeTwin store