Overview
A large-scale migration of a legacy C-based system to a modern Java/Spring platform within a German public sector context. The system handles security-critical operations, making a big-bang rewrite infeasible. Instead, we applied the Strangler Fig pattern to incrementally replace C components with Java services while maintaining full operational continuity.
Approach
- Strangler Fig Pattern: New functionality is built exclusively in Java/Spring. Existing C modules are progressively wrapped behind a facade layer and replaced as their interfaces stabilize.
- Dual-stack operation: Both C and Java components run concurrently during transition, with a routing layer directing traffic to the appropriate implementation.
- Contract testing: Comprehensive contract tests ensure behavioral equivalence between legacy C modules and their Java replacements before cutover.
- Zero-downtime migration: Each module is migrated independently with feature flags controlling traffic routing, enabling rollback at any point.
Challenges
- Behavioral parity: The legacy C code had undocumented edge cases baked into years of production behavior. Extracting and codifying these into test suites was a significant effort.
- Security constraints: The public sector context imposed strict requirements on deployment pipelines, network boundaries, and change management processes.
- Team upskilling: Supporting the team’s transition from C expertise to Java/Spring proficiency while maintaining delivery velocity.
Outcome
The migration is progressing on schedule with multiple modules successfully migrated to Java. The strangler fig approach has proven effective in managing risk while maintaining continuous delivery.