i was working on a system for sending money like google pay or phonepe this week and hit some atomicity roadblocks. basically its all-or-nothing - if something goes wrong partway through, everything reverts to before the transaction started.
so i wrote up an sql command that looks kinda like:
begin;update accounts set balance = (balance-20) where name='alice';.
the key is making sure every step either completes or nothing does. its a pain but critical for reliability!
what about your experiences with atomic transactions? any gotchas youve run into?
anyone using nosql databases instead of sql have had success avoiding these issues entirely by designating each transaction as an indivisible unit itself!
link:
https://dev.to/santhosh_v/ca-34-atomicity-design-a-reliable-wallet-transfer-system-with-acid-guarantees-2ph0