Automatic Initialization at Startup
Key Concepts
- How to run queries on startup automatically?
- Bulk Initialization patterns.
Background
Device Management
Bulk initialization of Things is closely tied to the device management aspect of IoT Platform. The devices layer is the most important component of an IoT solution. A mature IoT platform comes with comprehensive device management features that let customers:
- On-board existing and new devices with rich metadata.Â
- Identical devices that share the same metadata are grouped together. This feature makes it possible to search devices based on their capabilities.
- The platform also provides per-device authentication and authorization to enforce enhanced security.Â
- It makes it easy to define which devices can connect, send, and receive messages.Â
- Devices can be easily blacklisted and whitelisted through declarative policies.
A-Stack platform provide mechanisms to easily address above device management requirements.
Bulk Initialization Design Pattern
At the time of writing this tutorial Atomiton A-Stack does not provide specific language constructs to perform bulk initialization of Things or Data. But the existing Atomic domain languages capabilities can be exploited to achieve bulk initialization requirements. The bulk initialization design pattern can be broken down into two steps:
Bulk Initialization Steps:Â
Step # | Name | Description | Output | Implementation Flow |
---|---|---|---|---|
1 | Gather Metadata | Input to gathering of metadata step can be:
| The output of gathering metadata step could be:
|
|
2 | Initialize | Initialize step includes:
| The output of initialize steps are:
|
|
3. | Run Queries Automatically | There are often requirements to run queries automatically at startup. For scenarios as listed below it becomes imperative to run queries automatically:
|
|
|