This pattern is part of "Patterns of Legacy Displacement"

Divert the Flow

Divert key business activities and processes away from legacy first

This page is a stub. We intend to fully expand it in later revisions of this material. However we are still in the middle of developing these patterns, so it's likely that patterns will be renamed, split, or merged as we continue to learn how best to frame and explain these ideas.

A very common challenge when replacing legacy systems is that they often support key cross cutting business activities, such as reporting, auditing or providing key business metrics. These functions are often supported by a sub-system embedded within legacy that pulls data from other legacy components either directly or using older integration technologies such as file based batch jobs.

Figure 1: Embedded Reporting

When we come to migrate these other components out of the legacy system we have to ensure the cross cutting functionality, say reporting, continues to work. This is often done by continuing to provide data to the reporting component from new replacement systems using the existing integration mechanisms, perhaps using a pattern such as Legacy Mimic. Our experience is this can lead to extracted functionality remaining coupled to legacy data structures while key users continue to see "as is" functionality for the majority of any replacement project.

Figure 2: Feed data into Legacy

As an alternative approach we instead can "divert the flow" and extract the reporting functionality, say, at the very beginning with the various legacy systems acting as data sources for this new solution until migrated themselves. While it could be argued this creates extra throw away work (the temporary integration with legacy) we see it as akin to diverting a river when building a dam.

Figure 3: Extract reporting first

Engineers divert a river to create a safe and secure environment for building the dam, once complete these diversions might then be surplus to requirements but few would argue they were a waste of money or unnecessary.