The ever growing number of connected smart devices requires an efficient, flexible and standardized way to manage their configurations, behavior, updates, etc. This is ensured by mass management - a process which simplifies and facilitates the execution of management actions over large numbers of devices with a single operation. This process can be direct and unconditional, or automated and condition-based, which in Bosch IoT Manager is realized through tasks and rules, respectively.
The 'mass' element of the process is achieved by the possibility to set a scope for the execution of the management actions. Thus all devices which satisfy the criteria of the scope - potentially millions of devices but sometimes only one device as well - will execute the action. Its efficiency can be optimized by a number of inbuilt execution options such as limiting the number of devices which can execute the action simultaneously, limiting the execution to specific time periods etc. In addition to devices, the management actions can target the backend system as well.
Tasks and rules
The execution of а mass management action can be initiated, monitored and managed via two mechanisms - as single tasks or as automated rules. Т hese two mechanisms share many common elements but rules provide a much broader range of opportunities. The similarities and differences between the two are outlined below and are explained in more detail in the topics dedicated to Tasks and Rules.
Tasks consist of scope, action and execution options. They can be best understood as the one-shot unconditional execution of a management action (defined as an action script) on a set of devices (defined by the scope of the task), as adjusted by execution options. Tasks in this sense are always launched manually by the user and their execution starts immediately. The task usually involves multiple executions of the action script - one execution per device in the task scope.
Rules on the other hand include an additional element called trigger - in addition to scope, action and execution options - which causes automatic execution of the action script upon the occurrence of a set of circumstances - conditions and events. One rule can be and usually is triggered multiple times, thus the execution is not one-off but recurrent. Each triggering of the rule launches a task, and from there the process continues as described for single tasks in the above paragraph. In other words, rules automate the execution of tasks.
To sum up tasks can be created separately from rules, but rules always launch one or multiple tasks.
The Mass Management Engine operates together with the Device Inventory in order to fulfil the smooth batch management of devices registered with Bosch IoT Suite. Device Inventory provides device abstractions, whereas the Mass Management Engine receives notifications of events related to the devices and acts on the basis of them - sends commands to and reads them.
The interaction between the Mass Management Engine and the Device Inventory is fulfilled by means of several different built-in triggers corresponding to the different types of events which can fire rules, as well as by the Groovy Script Engine which sends the management commands to the devices.
The mass management capabilities are accessible via the Bosch IoT Manager Console – an administrative UI providing the full functionality of Bosch IoT Manager - or via any other custom application built on top of the Mass Management Engine’s APIs.
The Mass Management Engine's role:
interacts with the different types of built-in triggers and the Groovy script engine to allow the creation and execution of tasks and rules
evaluates the scope of tasks and rules and guides the mass executions to the proper targets
controls the mass executions based on the built-in execution options, i.e. ensures the concurrency limits, time constraints, etc.
evaluates the trigger's condition(s), if available
maintains the queue of pending executions
reports detailed execution results to the console or other end-user applications
More details on the elements and mechanisms of tasks, rules, triggers and the Groovy script engine are available in the following sections of this documentation.