I am using PHP and MySQL to run a backend server. Currently I have a "Action" table that contains certain criteria and what action should be taken, the properties are following:
Conditions
(contains complex criteria, e.g.[Item.Qty] > 100000 AND [User.Level] < 5 AND [Item.Price] > 100000
)Actions
(e.g.SEND EMAIL TO [SUPERVISOR]
)
I already have the condition parser that will return boolean.
The software will need to validate every user's action to the every rules (e.g. enterprise software). But I have thousands of rules and number of request is high.
Any idea to run this in real-time when user submitting / saving data to the system?
Thanks :)
Notes: Since I have tons of feature to compare, decision table is not a feasible option here