So, with the introduction of IoT devices and blackbox devices, we need a better way for the user to select these in their model.
I’m proposing to add string tags to a resource that can be reconciled against. For example, something like when facility modeling:
tb.Node(
fmt.Sprintf("alexa%02d", i),
ExperimentTags(
"alexa",
"iot",
"arm",
"alexa-vVERSION"
),
Then, during experiment modelling, you would do something like:
a = net.Node("alexa", tags>=("alexa"))
or so.
For tags, the operators meaning would probably be:
- ==: Exactly match all tags
- !=: Do not contain any of those tags
- >=: The resource has at least these tags
- <=: The resource has at least one of these tags (kind of like subset)
Now, I am not particularly enthused about string matching myself, but I think that different facility owners can maintain a list of their tags as a python package. So instead, you would having something like:
import net
import neuiot
a = net.Node("alexa", tags>=(neuiot.tags.alexa))
In practice, we would probably have a set of common tags (like architecture, server, embedded) or so that’s common for everyone to use that prefixed with common
- “common.x86_64”
- “common.server”
- “common.embedded”
While specific facilities would have their own tags prefixed with their own facility:
- “neu.alexa”
- “neu.speaker”
The idea is that devices with the same tags should be interchangeable with each other, including which images they can run. As a result, even if different facilities have the same devices, unless they’re accessed in the same way (which is unlikely for IoT devices), they should have different tags.
The default tag constraint would probably be tags>=(common.server, common.x86_64)
and current nodes would have their added in their model.