Skip to content

Architecture: Common Patterns

Shannon Weyrick edited this page Sep 23, 2021 · 8 revisions

Data Model

  • Unique identifiers for objects in the model are named id and are UUIDv4 format
  • Most objects have a name field as a Name Label (below)
  • Most objects have a mf_owner_id to indicate ownership and support multi tenancy. The field is in UUIDv4 format and represents a Mainflux owner id

Orb Tags

Most objects have an orb_tags field which is a JSON object of simple key/values (recursive objects are not supported). This is for organizing the objects and allowing for easier searching and filtering.

Name Labels

Name labels are string/text fields which are meant to be unique identifiers or labels for an object. They may contain ASCII letters and digits, as well as underscores. Must match the regex [a-zA-Z_][a-zA-Z0-9_-]*