Brief Background:
I currently maintain a fifteen year old inventory management system. In an effort to provide real-time quantity on hand for both single items and kits (possibly nested down to the Nth level), inventory is allocated to orders on the fly when a page is requested (allocation priority is determined by date received and date expected). Depending on how many orders are in the system, and more specifically, how many of those orders contain nested kits, performance can be an issue.
The Question(s):
We're currently in the process of designing a new inventory management system using SOA principles. Instead of allocating the inventory on the fly, we would like an allocation table to be updated after every insert, update, and delete occurs that could affect the items allocation data. There is some debate as to whether the allocation table should be updated by triggers in the DB, or by the C# order service.
- Which method would best adhere to SOA principles?
- Which method would be more performant?
- Is this the proper use of a trigger?
- Is either method generally accepted by the community at large as the "proper way to do things"?
Thanks in advance for your time!