The rule engine
The rule engine is essentially mapping between IoT events and actions that need to be associated with those events. In the IoT context, events are typically generated using sensors, and required actions are taken by an actuator. The notation used for this pattern in this book is shown in the following figure:
Figure 3.6 – The notation for a “rule engine” pattern
An interesting analogy is to compare the rule engine to the human mind, where the use of the five senses can be compared to the activation of sensors, and then corresponding actions are taken by body parts (hands or legs, for example), as shown in the following figure:
Figure 3.7 – A rule engine decoupling sensors and actuators and its comparison with the human body/mind
Additionally, the cause-and-effect relationships in the IoT context are dynamic as well as complex, which can only be made possible by having an entity such as the...