News for hackers. Stuff that matters.
Re: by throwaway290 on Thursday August 31, 2023 @01:03AM (#37332667)
Or you can throw both transactions into an event queue and let the worker process each whenever it gets to it. You get the point...
Re: by zaphirplane on Thursday August 31, 2023 @03:09AM (#37333522)
Then the source account could not have the funds for the transaction at the time the operation is ... transacted
Re: by vidarh on Thursday August 31, 2023 @05:02AM (#37334352)
Which regularly happens with bank accounts - hence overdrafts.
Re: by hakunin on Thursday August 31, 2023 @12:23PM (#37339715)
The truth is, this does happen, but you want it to happen less. Banks accept certain amount of risk due to logistical limitations, but always seek ways to reduce it.
Re: by throwaway290 on Thursday August 31, 2023 @12:35PM (#37339888)
Tradeoff between availability and consistency. Not to error when accepting a transaction probably makes bank good money, but showing correct numbers all the time or handling transactions larger than entire account balance probably only ever helps poor people like me who anxiously check incoming transactions at the ATM and we don't make banks lots of money. So a queue of transactions to record doesn't sound like a problem, but idk I don't work at a bank
Re: by yawaramin on Friday September 01, 2023 @01:22PM (#37353715)
Overdrafts come with limits--hence the need for a transaction to check that we are within the limit.
Re: by throwaway290 on Friday September 01, 2023 @02:09PM (#37354309)
I don't use credit, zero overdraft, saw it go negative many times.
Re: by vidarh on Friday September 01, 2023 @02:53PM (#37354779)
Accounts go over their overdraft limits all the time. Arranged overdrafts are simply the limit the bank promise to honour without punitive fees, not an absolute limit.
Re: by throwaway290 on Thursday August 31, 2023 @05:04AM (#37334371)
Honestly I have seen enough times purely savings/debit account goes negative a few dollars that what you describe is probably not a show-stopper :) Only if discrepancy is large enough then probably transaction gets flagged and a human steps in.

Or the queue could be strongly ordered.