API Evolution
Problem
In the current system, we are using the Anti-Corruption Layer (ACL) pattern to isolate and protect our modern services from the complexities and inconsistencies of a legacy system. This approach requires building a separate layer for data translations, protocol adapters, and encapsulation of business logic in isolated operations. Although it provides an effective solution for integrating legacy systems, it adds overhead and complexity to the overall architecture.
Solution
To address the issues present in the legacy Anti-Corruption Layer pattern, we propose a new solution that extends the legacy system without the need for a dedicated ACL. This approach involves creating split operations that call both the legacy API and the new Service API, allowing the addition of new functionality without the need for translation, protocol adapters, or encapsulation in a secondary system.
Note: Using custom resolvers in WunderGraph (opens in a new tab), you can extend an API call and bypass the need for a separate ACL layer. With this approach, the ACL effectively becomes a sidecar to your API, reducing complexity and streamlining the integration of legacy systems.
The key difference between this new solution and the traditional ACL approach is that it does not involve creating a disposable system through an ACL. Instead, the new solution focuses on extending the legacy system until it becomes depreciable, providing a more efficient and simplified way of integrating legacy systems into modern microservices architectures.