udmi

UDMI / Docs / Cloud / GCP / Functions

Cloud Functions

Deploy

Run udmis/deploy_udmis_gcloud ${project_id}

Basic Architecture

The basic UDMI function architecture allows for data flow through the system and integration with cloud-based agents.

External Components

Cloud Topics/Functions

graph LR
    %%{wrap}%%
    I[<b>IoT Core</b><br>registries/<i>site_name</i><br>devices/<i>device_name</i>]
    T[topic/function:<br>udmi_target]
    C[topic/function:<br>udmi_config]
    S[topic/function:<br>udmi_state]
    J[subscription:<br>agent]
    A[<b>external<br>agent</b>]

    I -.-> |event| T
    I -.-> |state| S
    S -.-> T

    C --> I

    T --> J
    J --> A
    A -.-> |config| C
    C -.-> T

(solid lines are direct API calls, dashed lines are PubSub messages)

Reflector Architecture

The UDMI reflector setup is designed to allow an external (to the GCP project) utility to interact with the system through a channel authenticated as an IoT Device. This is functionally equivalent to an agent connected over PubSub, but has a different authentication/connection paradigm. Specifically, a PubSub connection will rely on a GCP-based IAM auth to provide access to PubSub resources, while a reflector connection relies on a device-specific credential and connects over MQTT.

Utilities connect to the UDMI-REFLECT IoT Core registry, backed by the udmi__reflect topic/function. The ‘device’ within the UDMI-REFLECT registry is actually the site_name of the site (so not an actual device), corresponding to the IoT Core registry containing the actual device connections. The (undocumented) reflector API allows for all the basic device-oriented operations { config, state, events, _commands } as well as some meta-functions like querying the version of running UDMIS functions.