I'm currently exploring the microservice architecture and base on what I've read so far it's good to separate the catalog microservice/database to inventory and that's where I want to go.

The problems:

  1. Since the catalog will be on another database (PostgreSQL/MongoDB) compare to the inventory (PostgreSQL). When I want to create a report of inventory movement with product code, what's the best way to model it? So far I'm sending the productId to the inventory but not the code as it might change.
  2. What's the best way to track the inventory movement? I have this schema in mind:


-action (IN/OUT)

InventoryTransactionSummary <- updated daily
-prevTotal - total from the previous date
-total - prevTotal + productIn - productOut
-productIn - in stock
-productOut - sold, pullout, etc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.