- 我正在设计一个C ++服务器应用程序,它必须根据从各种来源收到的不同数据生成各种类型的警报。 - 服务器应用程序必须对每种数据类型应用特定的算法/验证以识别故障并生成故障警报/警报 - 一旦识别出故障,信息将被发送到客户端和登录数据库。 我应该选择哪种设计模式来实现警报/警报功能并执行后续操作,如发送/记录等? 请求专家提供建议。 谢谢。 我的尝试: 我打算使用州或州机器模式根据收到的数据更改状态并进行维护。 状态更改后,有一些算法可以应用于每种类型的警报来生成它。
Hi, - I am designing a Server Application in C++ which has to generate various types of Alarms based on different data received from various sources. - Server application has to apply specific algorithm/validation for each data type to identify the failure and generate Failure Alarm/Alert - Once the failure is identified, the information will be sent to the clients and also logged in database. Which Design pattern should i choose to implement Alarm/Alert functionality and perform subsequent action such sending/logging etc? Requesting experts to provide suggestions. Thank you. What I have tried: I am planning to use State or State machine pattern to change the Status based on the received data and maintain it. After Status is changed, there are certain Algorithm to be applied for each type of Alarm to generate it.
推荐答案这实际上取决于您的场景的完整细节,无论如何,策略 [ ^ ]模式可以考虑。 It really depends on the full details of your scenario, anyway, the Strategy[^] pattern could be taken into consideration.
更多推荐
选择哪种设计模式用于报警/警报系统
发布评论