I’m asked these two interview questions in my interview and nowhere in web I could get the answer, as I’m sort of new to programming.
Can someone please help me with some Answers for these.
- How to attain synchronisation or concurrency management.
Imagine it’s a e-commerce website that users can redeem points. When a user opens another browser tab and redeems the available points two times, how to prevent this? It’s a rest Api using web api or graphql.
- How to redeem an available point say 20$ when user purchasing through our partner website, so basically item cost 50$, so redeem 20$ and pay only 30$ and remaining points or redeem amount should show as 0$
I don’t know answers to both the questions. Can someone give me some good insights for these and tips and also some links to study as I don’t know what techniques applies here too