Design: Anti-corruption Layer for Microservices Integration
Design the anti-corruption layer component between two microservices with different domain models and communication protocols. Out of scope: internal implementation of each microservice business logic.
Functional Requirements
FR1: Allow two or more microservices with different data models and protocols to communicate without corrupting each other's domain logic
FR2: Translate requests and responses between incompatible interfaces
FR3: Prevent changes in one service from forcing changes in others
FR4: Support synchronous and asynchronous communication
FR5: Handle data validation and transformation
FR6: Log translation errors for debugging
Non-Functional Requirements
NFR1: Must handle up to 10,000 requests per second
NFR2: API response latency p99 under 150ms
NFR3: Availability target 99.9% uptime
NFR4: Must be scalable horizontally
NFR5: Should not introduce tight coupling between services