Exercise 8: Dealing with state flapping
In this exercise, the goal is too avoid the state of lights to be change on very short periods (i.e., a child run over and over from one room to another causing a large amount of events to deal with)
For this exercise, you will not be guided. The goal is to propose an architecture and a solution for avoiding state flapping (never-ending change due to repeating events).
Hints :
- You may use a time-frame and some counters associated to each device as a first approach.
- It would be a good idea (but more complex) to let the manager manage such case. You may for instance change the configuration interface of your follow me component to allow the configuration of a non-changeable device list. This list would be configured by your manager.