samedi 14 août 2021

Microservice design: change on data requirements or schema

Suppose we have 2 services, service A and service B. They are interact with each other with event sourcing. Service A publish event ( entity1 created with fields f1, f2, f3). Service B make own copy of entity1 with fields f1 and f2. Now how we can address this two scenario.

  1. New requirement in service 2 and needs for f3. How service2 must update its local data?
  2. Schema change on service 1. how service 2 must update its local data and schema?

In scenario 2, services are tightly coupled by schema and can causes errors and this has contradict with event sourcing goal. How can we address this problem?

Aucun commentaire:

Enregistrer un commentaire