Posts

Showing posts from April, 2013

Time Sensitive Priority Escalation Algorithm (Heuristic)

Imagine a scenario where records maintained in a database need to be transitioned from one state to another i.e. the next higher state based on how long those records have been in the current state. This is a common scenario in trade settlement, customer service or ticketing systems where the incidents are governed by strict SLAs such that the priority of the case goes on increasing the longer the time it spends on a wait queue lying unattended.  Supposing you were to write a program where you would fetch these records from the database and then check for each one of those records how much more time is left before it needs to be escalated to the next higher level. What would be the time interval at which you will fetch potentially hundreds or thousands of records from the database and then go on checking for each one of them whether to escalate it to next level or keep it in the same state?  The program will need to go on polling the database at regular intervals. But w...