Any suggestions for an Architecture improvements ?
I have the following architecture (in blue = our microservices, in red = external):
On the top of diagram: Clients create/update products using Products-Domain REST endpoints. Each time a product is created/updated, we store it in the database and send a JSON message to the ProductPublisher microservice. This microservice converts it to an XML format understood by ExternalSystem1 and sends it to that external system. Each product has an id and a type ("New," "Used," "Refurbished"). Each product also has other information like dimensions and weight.
On the bottom of diagram: the Stock-Consumer receives XML messages from ExternalSystem2 containing updates about the stock of products. For each product id, we receive information about available-stock, blocked-stock, etc. The Stock-Consumer converts this information to JSON, understandable in our domain, and sends it to Stock-Domain. The domain calculates the sum of the received message and existing stock information.
Problem: We want to create a front-end for only a subtype of products (Refurbished, representing only 5% of total products). In the front end, we need to aggregate data about refurbished products and their stocks. For example, we need to provide a filter functionality about (refurbished) products whose stock is below or above a given level (given by user).
On the top of diagram: Clients create/update products using Products-Domain REST endpoints. Each time a product is created/updated, we store it in the database and send a JSON message to the ProductPublisher microservice. This microservice converts it to an XML format understood by ExternalSystem1 and sends it to that external system. Each product has an id and a type ("New," "Used," "Refurbished"). Each product also has other information like dimensions and weight.
On the bottom of diagram: the Stock-Consumer receives XML messages from ExternalSystem2 containing updates about the stock of products. For each product id, we receive information about available-stock, blocked-stock, etc. The Stock-Consumer converts this information to JSON, understandable in our domain, and sends it to Stock-Domain. The domain calculates the sum of the received message and existing stock information.
Problem: We want to create a front-end for only a subtype of products (Refurbished, representing only 5% of total products). In the front end, we need to aggregate data about refurbished products and their stocks. For example, we need to provide a filter functionality about (refurbished) products whose stock is below or above a given level (given by user).
