Let's imagine you run a fictional online store with a websocket on nodejs and socket.io.
Scenario 1: Now a user A and a user B click on "buy" for the same product "at the same time".
Q1: How will you check if the current product is in a "selling process" and block the latest request for the product?
Scenario 2: A user clicks more than 1 time on "buy" in a very small period of time.
Q2: How will you block the other requests?
via Adhskid
No comments:
Post a Comment