What patterns do we have to use when performing this kind of updates on a relational database?
Specifically, what level of isolation is preferred to prevent this kind of race condition when using Postgres? (please explain your reasoning)
Please give a broad idea on how you would design the architecture of this web app with your favorite stack/framework, in terms of front-end, back-end and database.