Concurrency control for inventory control
There are many similar questions related to my question. But I didnt find
any satisfactory ans for my question. So I am putting this question in
this forum.
I have a question in concurrency control in inventory management system.
Say I have products A, B, C with quantity 2,3,4. And my application is
multi user.
I have product page where user see the list of products and available
quantity. and I have check out and payment page which may take some time
to reach after product page.
Now if it is multi user web application and say user 1 has ordered 2
quantity product A but order is not yet placed, user 2 can still see A
with 2 quantities.
Should I temporarily(configurable time) lock the 2 quantities of product A
until order is placed? Is it a good design. If yes, should I lock in java
or in the database?
No comments:
Post a Comment