Smart Rules Architecture
What is the Smart Rules Engine?
The Smart Rules Engine allows users of Callback solutions to build rules based on the time of and various queue statistics from Dashboards to change configuration settings.
The Smart Rules Engine is broken down into 4 small components, or threads on the VM, each performing a different function.
- Rules Engine: Determines when it's time to trigger a rule.
- Configuration: Responsible for displaying rules and building rules in the UI. It also is responsible for submitting the change of setting based on a rule being triggered.
- Queue Statistics: Gathers real-time statistics used in determining if a rule should be triggered.
- Notifications: Sends emails when a rule is triggered.
The Smart Rules Engine is an optional application which would be installed on each Core Instance server in a Callback solution.
A Smart Rules UI is available when the Smart Rules engine is deployed. This UI displays license usage and allocation.
Architecture Overview
Details on each connection point:
- The internal threads within Smart Rules Engine will uses RabbitMQ to communicate.
- When a rule is triggered, the Configuration thread in the Smart Rules Engine is told by the Rules Engine thread through RabbitMQ that a queue variable change is required. The Configuration thread will send required queue variable changes to the Configuration Translation API.
- The Configuration Translation API web service will call VHQMWS to continue the process of setting the new queue variable. The Configuration Translation API will use line 7 to update the configuration database with the new setting for the queue variables. Line 6 is used to record when the rule was triggered in the historical database.
- The VHQMWS web service calls the Message Bus to continue the process of updating the new setting for the queue variables.
- The Message Bus sends the new queue variables settings to Queue Manager. This is when impact intended by the rule being triggered becomes live.
- The Configuration Translation API web service writes historical data pertaining to rules being created, modified, activated, de-activated, and triggered. The Smart Rules UI will uses this connection to display historical metrics.
- The Configuration Translation API web service uses the configuration database to write new rules and modify rules. It is also used to update the configuration database of a new queue variable settings when a rule is triggered.
- The Queue Statistics thread in the Smart Rules Engine will call the VHQWatchWS web service to retrieve real-time queue statistics data to help with rule evaluation.
- The Smart Rules UI calls the Configuration Translation UI web service to display rules in the UI, modify and create rules, and display historical performance metrics for rules.
- The Notifications thread calls a 3rd party SMTP server to send emails when rules are triggered.