Strangler Fig pattern (3): Coexistence of old and new: anti-corruption layer, transitional architecture, branch by abstraction, parallel change
During a migration the old and new systems must run side by side. Four components keep that in-between state workable. They differ only in where the seam sits, and each one needs its removal timing worked out.
This is the third article in the series. The previous one covered where to cut. This one covers what holds things up in the period after the cut, when the new system is live but the old one has not yet been removed.
Conclusions first
- Anti-corruption layer: when the old and new systems call each other, a middle layer takes charge of the translation, so the new design is not pulled along by the old model (Microsoft, n.d.-a).
- Transitional architecture: components built for coexistence and removed at the end, like scaffolding. Whether one is worth building depends on comparing the time and risk it saves with its cost (Cartwright et al., 2022).
- Branch by abstraction: when the internals of a program (a module, library or framework) are to be replaced, first wrap a layer of abstraction, then swap the implementation behind it. The whole time, the system can still be built and run (Fowler, 2014).
- Parallel change: when an interface must change in an incompatible way, split the work into three steps: expand, migrate and contract. If the contract step is left undone, the result can end up worse than where it started (Sato, 2014).
1. Anti-corruption layer
When the old and new systems call each other, a middle layer is placed between them to handle the translation, so the new system’s design is not pulled along by the old system’s data model and API. Microsoft describes this in the context of a multi-stage migration in which old and new run side by side (Microsoft, n.d.-a, “Solution”).
Microsoft’s page also lists the costs: an extra delay and one more service to maintain. It suggests deciding in advance whether the layer will be retired once migration is complete or kept for the long term (Microsoft, n.d.-a, “Problems and considerations”). The reliability section of the page adds a separate warning that the layer can become a single point of failure (Microsoft, n.d.-a).
AWS’s version has a similar component: callers inside the old system keep calling functionality that has already moved using the old interface, and a translation layer converts those calls into the new interface. Once everything that depends on it has been moved, the translation layer is removed (Amazon Web Services, n.d., “Adding an anti-corruption layer”).
2. Transitional architecture
Cartwright et al. liken components built for coexistence and due for removal at the end to scaffolding, and acknowledge that this is an investment they know will be thrown away. Their way of judging is to weigh the delivery time and risk reduction it often buys against its build cost. When the two are close, they also suggest considering the possibility that replacement takes longer than expected (Cartwright et al., 2022, “When to use it”).
They also say that it may be worth spending a little more during construction to make later removal easier, and that you should confirm the component really is removed (Cartwright et al., 2022, “How it works”). The text includes a case of retiring middleware that shows, step by step, when each temporary component is added and when it leaves (Cartwright et al., 2022, “Example: architecture evolution”).
Fowler also notes that people often hesitate to build code that will disappear once it has done its job. He admits this looks like waste, but judges that the lower risk and earlier value of an incremental approach outweigh this cost (Fowler, 2024).
3. Branch by abstraction
When the thing to be replaced is a module, library or framework inside the program, Fowler describes this approach (Fowler, 2014):
- Put a layer of abstraction between the callers and the component to be replaced, so that callers reach the existing implementation through this layer.
- Build the new implementation behind the same abstraction layer.
- Switch the callers over to the new implementation piece by piece. The author also mentions two variations: sometimes the switch can only be made all at once, not for part of the component; sometimes the component can be split into small pieces and handled one at a time.
- Delete the old implementation once it is no longer needed. The abstraction layer, too, can be deleted once the migration no longer needs it, if you choose.
This approach requires the system to be buildable and runnable correctly at all times during the replacement, so that releases can continue. The author mentions two side benefits: as callers move through the abstraction layer, it is an opportunity to add unit tests for the old implementation; and while building the new implementation, a feature flag can run it in the test environment so its behaviour can be compared with the old one.
4. Parallel change
When an interface must change in an incompatible way and has many users, Sato splits the change into three steps (Sato, 2014):
- Expand: the provider supports both the old and the new version at the same time.
- Migrate: users switch to the new version gradually.
- Contract: once every usage has moved, the old version is removed.
He points out the drawbacks: while both versions coexist, the provider must support two versions, and users may get confused. If the contract step is left undone, the result can end up worse than the starting point, so discipline is needed to finish the conversion. He also says that even when you control every usage, the approach is still useful, because it keeps breakage from spreading through the whole codebase at once. As for choosing between parallel change and an abstraction layer, he thinks that when there are many users, the abstraction-layer strategy is the better one.
5. The four parts are solving the same problem
My view is that all four components keep the in-between state, in which “the new system is live and the old one has not been removed”, safe to maintain for a period. They differ only in where the seam sits: the anti-corruption layer sits at the boundary between two models, branch by abstraction sits inside the program, parallel change sits in the interface itself, and transitional architecture is the umbrella term for these temporary components. This is my own grouping, not a classification from any one of the source articles.
They also share one risk: they may never be removed. I come back to this in the fifth article.
This series
- Why not rewrite it all, and what is the Strangler Fig pattern
- Seams: where to cut the old system open
- Coexistence of old and new: anti-corruption layer, transitional architecture, branch by abstraction, parallel change (this article)
- Cutover and verification: leaving the step that cannot be undone to the end
- Pitfalls and situations where it is not suitable
- What academia says: evidence, gaps and a checklist
Sources
- Microsoft. (n.d.-a). Anti-corruption Layer pattern. Azure Architecture Center. Retrieved November 8, 2026. (Official documentation)
- Cartwright, I., Horn, R., & Lewis, J. (2022, March 28). Transitional architecture. martinfowler.com. (Pattern article)
- Fowler, M. (2024, August 22). Strangler fig. martinfowler.com. (Blog post)
- Fowler, M. (2014, January 7). Branch by abstraction. martinfowler.com. (Blog post)
- Sato, D. (2014, May 13). Parallel change. martinfowler.com. (Blog post)
- Amazon Web Services. (n.d.). Strangler fig pattern. AWS Prescriptive Guidance. Retrieved November 8, 2026. (Official documentation)
← Previous:Strangler Fig pattern (2): Seams, and where to cut the old system open
Email subscriptions will open later. For now, you can follow new articles and work with RSS.