Design an account/payment system
4582

Scenario:
You are designing a system for a bank, which allow the clients to deposit and withdraw money from their account.
For example, let's say this is a business checking account with $X of balance in the account.
The business account is shared among different employees across the world. So there could be multiple people depositing/withdrawing money from the account frequently from different places in the world.
How do you design this system so that you can have the minimal transaction latency of money deposits/withdrawals but always making sure you never accidently overdraw (withdrawing below 0 balance)?

Follow ups:

  1. If using locking/transaction - what are some consideration to ensure efficient locking across attempts to lock/write from multiple regions?
  2. Can we do better than locking/transaction to allow concurrent transactions across multiple regions?
Comments (3)