Identifiers

Overview

All objects in the Droplit system must have identifiers. Every identifier should be unique in the Droplit system, and each identifer must be unique in the context in which it resides.

For example, consider two groups of identifers.

  • A, B, and C in group D
  • A, E, and F in group G

Identifiers B, C, E, and F are unique, regardless of what group they are in. They are the most robust kind of identifier, because they do not require any other information to uniquely identify or access them.

Identifier A in group D, and identifier A in group G, are also valid, because they are unique in their groups. However, they require further context, defining what group they reside in, to clearly state which identifier is being referred to. In the Droplit system, this is called a scoped reference. To distinguish identifiers by their context, use a semicolon, as “CONTEXT;IDENTIFIER.”

Taking scoped references into account, the groups of identifiers, when identified uniquely, would be:

  • D;A, B, and C in group D
  • G;A, E, and F in group G

There are three types of identifiers in the Droplit system: IDs, aliases, and domains.

IDs

IDs in the Droplit system are strings of letters (both uppercase or lowercase) and numbers, used to identify an object. All objects must have IDs. IDs are not explicitly meant to be human-readable, and are always unique because they are system-generated.

IDs must meet the following format requirements:

  • Between 1 and 24 characters
  • Only contains characters:
    • “a-z”
    • “A-Z”
    • “0-9”
    • “_” (underscore)
  • No spaces

IDs are also case-sensitive.

Aliases

An alias is a human-readable name (pseudonym) used for an object. They have the same format requirements as IDs, and, like IDs, are case-sensitive.

Aliases can be used in place of an ID, as long as the alias is properly associated with the ID and the object the ID references. They must also be unique in their context, like an ID.

Any object which can support an alias contains an “alias” property. The alias is considered to be defined if the property is not null. An established alias can be removed by setting the “alias” property to null.

Aliases may be prefixed by a “@” symbol when referred to inside the system. For example, an alias called “thing1” could be referenced as “@thing1”. The “@” prefix is optional for all current uses, but may become required in the future.

Domains

A domain is an alias for a top-level object. The format for a domain has slightly different format requirements than other identifiers, as below:

  • Between 1 and 24 characters
  • Only contains characters:
    • “a-z”
    • “0-9”
    • “-” (hyphen)
  • No spaces