udmi

UDMI / Docs / Tools / Project Spec

Project Specification

The Project Specification (project_spec) is a string format used by UDMI tools, primarily the registrar and validator, to dynamically configure the target IoT environment, provider semantics, and namespace isolation.

Format Specification

The string is evaluated according to the following regular expression:

^(//([a-z]+)/)?([a-z-]+)(/([a-z0-9]+))?(\+([a-z0-9-]+))?$

Note: The actual implementation in Java uses (//([a-z]+)/)?(([a-z-]+))(/([a-z0-9]+))?(\\+([a-z0-9-]+))? with specific capture groups.

The structure can be conceptualized as: [//provider/]project[/namespace][+user]

Component Breakdown

provider (Group 2, Optional)

The provider designates the primary IoT backend or protocol used by the tool.

project (Group 3/4, Required)

The project identifier is the core mandatory component of the spec. Its specific meaning depends heavily on the chosen provider.

namespace (Group 6, Optional)

The namespace allows for multiple parallel instances within the same project.

user (Group 8, Optional)

The user component suffix designates concurrent execution domains for different users on the same project without colliding on subscriptions or sessions.


Tooling Context: registrar

The registrar tool uses the project_spec to determine how to connect to the target environment to register devices, update metadata, and map physical topology into cloud constructs.

Implementation Deviations

While this document aims to be an authoritative specification, developers should be aware of the following discrepancies between documentation and current code implementation:

  1. Provider Optionality: Documentation historically implied //provider/project was mandatory. The regex (//([a-z]+)/)? allows dropping the provider (e.g., simply my-project). In such cases, the provider may default or fail depending on tool-specific initialization logic.
  2. Additional Providers: The tools accept a broader list of providers internally via the IotProvider enum (like clearblade, local, dynamic) than what was originally formalized.
  3. Regex Constraints: The regex enforces strict alphanumeric characters for namespaces ([a-z0-9]+) and user segments ([a-z0-9-]+), ensuring valid resource IDs downstream. Hyphens are allowed in project and user but excluded from namespace.

Examples