CRG design pattern helps us solving for change. When enterprise systems change, each change brings in an element of risk. Prod issues or time for roll backs affects operations & services. CRG solves this concern.
CRG helps us to release change to limited set of users / trans and if a change works, enlarge the scope of change gradually or enterprise wide. If it does not. disable it and roll back instantly.
CRG has 3 element constructs:
- Registry of Changes (ROC): Each change has a Change ID. If many changes are being made to an enterprise system together, changes serving completely separated concerns are to be given separate change IDs. ROC can maintain other details like deployment date, tech. release notes, functional release notes, etc.
- Change Control Gate (CCG): is a logical gate to control availability of change. Every transaction/service/comp uses CCG to check whether it can get thru the gate to access a particular change. This request is raised by the comps that were changed. CCG also keeps list of Change IDs yet to be approved for enterprise-wide release. CCG uses a criteria setup for the change ID to check whether to open the CCG gate or not. If the criteria are met, CCG provides a green signal and changed code enables execution of changed code. If CCG returns a red signal, the change code completely bypasses changes made and executes code that existed before the change. CCG also provides control to completely rollback a change and this will be applied with immediate effect, without any loss of time for roll backs.
- Change Control Criteria (CCC) : CCC maintains positive and negative criteria for each change ID. The criteria are constructed out of context elements that are available in the session/transaction/service/ comp context. These criteria may include User Roles/Ids, Branch / Office Codes, Product Codes, amount ranges, etc. We can also include a sampling control in the CCC, which allows only first n requests for us to check whether the change is working properly. Post execution of n transactions / requests, we can expand the applicability of the change, contract it or totally withdraw it.CCG provides several benefits: implementing change with minimum risk, no downtime during rollbacks, traceability of changes in the
code, no code gets deleted during changes and bringing ability to monitor change and impact of change.Patterns uses CCG in hyper automation of complex processes to bring in controlled change without any risk to operations.
CCG is a very simple design pattern, like most design patterns are. But if we keep this as tool in the toolset of our design thinking, then we will remember to solve the concern of ‘controlled and risk-free change’ in enterprise applications.