Skip to content
Dev.to

CA 34 - Atomicity - Design a Reliable Wallet...

Today I worked on a wallet system like GPay or PhonePe, where users can send money to each other. The main focus was Atomicity from ACID properties. Atomicity means “all or nothing”. If a transaction fails in between, everything should go back to the original state. Transaction I wrote a transaction like this BEGIN; UPDATE accounts SET balance = balance - 200 WHERE name = 'Alice'; UPDATE accounts SET balance = balance + 200 WHERE name = 'Bob'; COMMIT; Now Testing Failure I intentionally broke th
Read original on dev.to
0
0

Comment

Sign in to join the discussion.

Loading comments…

Related

Liked this? Start your own feed.

Your own feed is waiting.
0
0