Skip to main content
Engineering LibreTexts

7.8: Make a Bridge to the New Town

  • Page ID
    32908
  • Also Known As: The Bridge to the New Town [Kel00], Keep the Data — Toss the Code [BS95].

    Intent Migrate data from a legacy system by running the new system in parallel, with a bridge in between.

    Problem

    How do you incrementally migrate data from a legacy system to its replacement while the two systems are running in tandem?

    This problem is difficult because:

    • Some components of the legacy system are beyond repair and should be replaced.

    • Big-bang replacement of critical components is highly risky.

    • The data manipulated by the legacy components must be kept avail- able and alive during the migration.

    Yet, solving this problem is feasible because:

    • You have a running legacy system.

    Solution

    Make a (data) bridge that will incrementally transfer data from the legacy system to the replacement system as new components are ready to take the data over from their legacy counterparts.

    Steps

    • Identify legacy and replacement components that deal with the same logical data entities.

    • Implement a “data bridge” which is responsible for redirecting read requests from the new component to the legacy data source, if the data have not already been migrated. The bridge is responsible for any necessary data conversion. The new component should not be aware of the bridge.

    • Adapt the legacy component to redirect write requests to the new component, so that the new data stay up-to-date.

    • When all the data have been transferred, remove the bridge and the legacy component.

    A Bridge helps you to transparently transfer data to the new system.
    Figure \(\PageIndex{1}\): A Bridge helps you to transparently transfer data to the new system.

    Tradeoffs

    Pros

    • You can start using the new system without migrating all the legacy data.

    Cons

    • A data bridge can be tricky to implement correctly if there is not a simple mapping between the legacy data and the new data.

    • Once some of the data has been transferred, it can be hard to go back.

    • The data bridge will add a performance overhead which mayor may not be acceptable.

    Difficulties

    “Stepwise migration schemes have proven very effective in large, layered business systems. They are not common in let’s say CAD applications that have check in/check out persistence and a tightly coupled and very woven object net.” [Kel00]

    Known Uses

    Brodie & Stonebraker discuss much more thoroughly the use of data bridges and gateways in Migrating Legacy Systems [BS95].

    Keller in “The Bridge to the New Town” [Kel00] focusses more on the technical issue of migrating legacy data, and he points out numerous examples of the pattern successfully being applied.

    There are many possible variants of this pattern, depending on whether the entire legacy system is to be replaced, or only a component, and whether users should be able to have access to both systems at the same time or not.

    Rationale

    A bridge between the old and new systems allows you to let users start using features of the new system before it is complete. The bridge isolates the two systems from each other so that the new system can be developed according to a new architectural vision without influence from the legacy system.

    Related Patterns

    A bridge helps you Migrate Systems Incrementally and thereby Build Confidence.

    • Was this article helpful?