I’m developing an alarm system. There is an alarm model that takes live data from a database that constantly updates. If a measurement is over a threshold that is specified beforehand an alarm will be triggered. A triggered alarm will send activate the message model. There are multiple unit operations each containing several measurements. Every measurement from the same unit operation should be categorized as the same alarm. The design pattern I need is for the message model. When an alarm is triggered a message model is created for each alarm. Each message model will send messages with an API or to appropriate staff on a website until a staff member responds. Staff members should receive independent messages from each alarm and respond to each one separately even if they are using the same channel to receive the messages. The message model will deactivate the alarm and end if it receives a response.
I’m a bit lost in finding a design pattern to implement the messaging model. I was thinking of using a mediator in between the alarm system and the messaging models that would also receive responses from the website and API. The messaging models would then be a chain of command each. However I feel that this is not the best solution. Does anyone have any suggestions?
Chris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.