Bird
0
0

Which of the following is the correct way to implement an anti-corruption layer between two microservices?

easy📝 Conceptual Q12 of 15
Microservices - Migration from Monolith
Which of the following is the correct way to implement an anti-corruption layer between two microservices?
ADirectly expose the legacy system's database schema to the new service
BAllow the new system to write directly to the legacy system's tables
CUse the same data model in both systems without changes
DCreate a translation interface that maps legacy data to the new system's model
Step-by-Step Solution
Solution:
  1. Step 1: Review implementation best practices

    An anti-corruption layer should translate and map data between systems, not share schemas directly.
  2. Step 2: Identify the correct approach

    Creating a translation interface that maps legacy data to the new system's model isolates differences and protects both systems.
  3. Final Answer:

    Create a translation interface that maps legacy data to the new system's model -> Option D
  4. Quick Check:

    Translation interface = Correct implementation [OK]
Quick Trick: Map legacy data to new model, never share schemas directly [OK]
Common Mistakes:
  • Exposing legacy database schema directly
  • Using identical data models without translation
  • Allowing direct writes to legacy tables

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes