In my domain i have the following modules:
WMS(Warehouse Management) SalesOrder(Contains salesorderline, etc..) This is a multi tenancy application, which means the database contains many companies, each company has it own set's of data. There is alot of crud, but also a big portion is operational.
Some data comes from a legacy-system, how would you go about making an integration here? There will be an integration running a time intervall and sending data to the API, writing both up and down(keeping in sync). So basically i'm asking how to import existing data into the system and should not this problem be a distributed transaction? There may also be data imports from other systems. The reason the data needs to be kept in sync is because the legacy have to live for a longer while.
Edit:
Let's say both modules stores it's own version of product:
WMS.Product:
- ProductName
- ProductNumber
- QuantityInStock
SalesOrder.Product:
- ProductName
- ProductNumber
- RetailPrice
Should the integration command look like:
Integration.Commands.SaveProduct
- ProductName
- ProductNumber
- RetailPrice
- QuantityInStock
And shouldn't this transaction be distributed across the different modules? If the transaction goes both ways there will have to be some kind of link between ids..
How to implement an anti-corruption-layer from legacy system with god models, when the integration have to go both ways..
Thanks in advance.