Enterprise Systems like Core Banking Systems perform millions of validations in a day. We logged the validations over few days in an actual implementation and found over 80% of these validations were repetitive. A repeated validation means, there is no state change (underlying data has not changed) since the previous validation and hence the validation result will be same as the previous validation. These repetitive validations waste infra resources & also take additional time for front end validations and transaction commits.
RTRU Pattern avoids repetitive validations or in a more generic sense any repetitive processing. This is one level better than the usual memory caching of frequently used database rows. RTRU uses a cache, the RTRU Cache, and this cache saves DB access time, reduces load on DB and also reduces CPU utilization.
When a validation or a RTRU candidate process / component executes, the parameters, state at the time of execution and the results are stored in the RTRU cache. When the same process is executed again, we need to check whether RTRU cache has a non-dirty entry for the set of parameters and state. If present, then the results from the RTRU cache are used and the validation / process / component is not executed. If the entry is not found or a dirty entry is found, then the validation / process / component is executed again and the RTRU cache is updated.
RTRU also implements listeners to dependent states and whenever any rows that contain dependent state of entries in the RTRU cache get changed / updated, then the RTRU cache needs to mark affected entries as dirty. RTRU implementations have choice of running the component independently, on dirty flagging to reupdate the RTRU cache, for very frequently used entries. For other entries the RTRU cache can get updated when the application runs the component when needed.
RTRU cache need not be cleared at the end of a day, end of a week or end of a month, providing reuse across days. RTRU cache needs to be persisted when the enterprise application is shut down and reloaded when the application is brought up. Hence it is important to support RTRU referral even when the RTRU cache is being loaded.
RTRU implementations have given systems designed by us 40-50% reduction in peak infra utilizations. This means this simple pattern can double system processing capacities and also bring in much better response times.
RTRU design pattern is an important design pattern in building High Performance (HP) applications.
We at Patterns use RTRU Design Pattern in Bot Worker driven Hyper Automation processes involving bulk processing or enterprise scale hyper automation involving large number of SOPs (Standard Operating Procedure) of a department or domain area of a Bank / FI.



