What are strategies to deal with seemingly common scenario of a limited inventory and an order form.
If there is one item left, and two people attempt to purchase at the same t开发者_运维问答ime. How do you deal with whoever submits payment last?
When a user adds a limited-supply item to their shopping cart, put a hold on the item for a small window of time - say, 15 minutes. It's theirs if they pay within the window, otherwise the hold is removed and the item is returned to the pool. (For the duration of the hold, the item considered "not available" to other users.)
AFAIK, it's pretty standard technique - I've seen Gilt do this, for instance.
精彩评论