Design an e-commerce system that supports two core operations: (1) query availability — allow users to check whether items are in stock, and (2) place order — allow users to purchase items. The design must address data contention problems that arise under concurrent usage (e.g., multiple users trying to buy…