Incremental replacement
Move one capability at a time instead of rewriting the whole platform.
Most real organizations are not starting from a clean slate. They are evolving a monolith, a legacy platform, or a tangled set of integrations. The Strangler Fig pattern supports gradual replacement by routing selected capabilities to a new implementation while the old system continues to run for the rest.
A big-bang rewrite of ordering or payments is rarely the responsible path for a running business. Incremental extraction lets the team learn boundary quality, production behavior, and data migration realities one capability at a time without betting the whole platform on one cutover date.
The Strangler Fig pattern surrounds an old system with a new boundary layer, then gradually redirects requests or events to new implementations. Over time, the legacy surface shrinks until the old capability can be retired. This approach lowers migration risk and creates feedback loops that a rewrite cannot provide.
It works best when the extracted capability has a clear boundary, well-understood data ownership, and measurable traffic. It works poorly when teams try to strangler everything at once or when no one can define what the legacy system actually owns.
Move one capability at a time instead of rewriting the whole platform.
Use adapters, proxies, or gateways to direct traffic gradually.
Each extraction teaches boundary quality, performance, and migration risk.
Choose a capability with meaningful ownership and manageable integrations.
Place a façade, gateway, or event bridge in front of the old and new implementations.
Extract rules first, then transition persistence and reporting paths carefully.
Once confidence and completeness are proven, remove the legacy capability instead of leaving both forever.
package org.javaomnibus.migration;
public final class OrderRoutingFacade {
private final LegacyOrderSystem legacyOrderSystem;
private final NewOrderService newOrderService;
public OrderView findById(String orderId) {
return isMigrated(orderId)
? newOrderService.findById(orderId)
: legacyOrderSystem.findById(orderId);
}
private boolean isMigrated(String orderId) {
return orderId.startsWith("N-");
}
}