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.

architecture diagramA Smart Rules UI is available when the Smart Rules engine is deployed. This UI displays license usage and allocation.

architecture diagram

Architecture Overview

architecture diagram

Details on each connection point:

  1. The internal threads within Smart Rules Engine will uses RabbitMQ to communicate.
  2. 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.
  3. 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.
  4. The VHQMWS web service calls the Message Bus to continue the process of updating the new setting for the queue variables.
  5. The Message Bus sends the new queue variables settings to Queue Manager. This is when impact intended by the rule being triggered becomes live.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. The Notifications thread calls a 3rd party SMTP server to send emails when rules are triggered.