
Backend Engineer | Web3 | Golang | Java | Laravel | Mod @BerfBased
127.0.0.1
Joined May 2018
- Tweets10.8K
- Following2.9K
- Followers1.8K
- Likes51.6K
Pinned Tweet
Database Transactions
One thing you don't want in a wallet system is money leaving one account without reaching the other.
I am building PropInvest, a property investment platform where users can fund wallets and invest in real estate. When an investor puts money into a property, the system needs to:
- Deduct funds from their wallet
- Create the investment record
- Update the property's funding status
- Log the transaction
Now, what happens if the wallet is debited, but the server crashes before creating the investment?
The investor's money is gone, but they don't own any shares. That's a nightmare.
This is why database transactions matter.
A database transaction lets you group multiple operations together so they either all succeed or all fail.
If the wallet debit, investment creation, and transaction log all succeed, the transaction commits.
If any step fails, everything rolls back. The wallet stays untouched. No partial state.
This is called atomicity, the A in ACID.
ACID stands for:
- Atomicity: All operations succeed, or none do.
- Consistency: The transaction preserves database rules and constraints.
- Isolation: Concurrent transactions don't interfere with each other.
- Durability: Once committed, changes persist even if the system crashes.
For PropVest's wallet operations, every debit, credit, and record is wrapped in the same database transaction.
One important detail though: this protects database changes within that transaction. It doesn't automatically reverse an external action, like a payment already sent to Paystack.
That is why I also used idempotency keys, locked balances, and reconciliation workers. But transactions were the foundation.
When handling money, a successful API response isn't enough. You need to make sure the underlying operations are actually safe.
Never assume your code will complete every step. Design your database operations to handle failure.
🤖 Made with AI
I just got a $30/hr offer from Mercor for a SWE gig (Dawn writer - Software engineer). Only catch is I must have a Macbook and i don't own one.
If you can do this, dm me.
127
You seriously underestimate how much you can do with time. 1 year is a fucking lifetime. 6 months is enough to go from 0 to 100. Even 1 week of full commitment 14 hours a day is enough to push the needle so far forward you won't even recognize yourself. Just do more. Just do what your heart desires. Just be better.
what? you think is impossible? or not necessary?
I'm trying to understand the exact reason for this foolish question.
I expected you to ask why he wants to build it so that we can educate you, that's a more valid question than "how".....
2
62
We are very quick to blame the white man; after all he decieved us, he stole from us, he kidnapped and sold our ancestors as slaves. One fact we often overlook however, is the part our own kin played in this.
1
1
40
It is sad that in this day and age, we still have men like that amongst us who under the guise of "democracy", have decided to align themselves with candidates who are so obviously not the right fit for governance (and this is putting it very politely).
1
8
probably won't be worth even half that much when vesting is over but still: insane generational wealth! 🔥
JUST IN: Over 400 Anthropic employees are now worth more than $100,000,000 each following the $ANT IPO.
Anthropic's seven co-founders are now worth over $20 billion each.
The average Anthropic employee is worth over $40 million.
1
2
94
Buchy retweeted
Forbes recognises 6 Nigerian billionaires.
Home-based
1. Dangote
2. Rabiu
3. Adenuga
4. Otedola
Diaspora
5. Ogunlesi
6. Awotona
7. Elumelu is also speculated to have reached that milestone, though not officially confirmed included by Forbes yet.
The good thing is, regardless of your view on school, you have one example from the list that can support your view.
If you believe school no too matter, you have an Otedola that is not a graduate and never really took school seriously.
If you are a nerd with heavy belief in book, you have Ogunlesi, a first class graduate of Oxford.
If you played draw (2:2) in school, you have Elumelu as your inspiration.
If you go to a school that is partly theological, partly secular, you have Dangote as an example.
If you do 9-5 and start business early, you have Elumelu.
If you do 9-5 for long, you have Ogunlesi that was a salaried employee for 25+ years.
If you japa, your children have Tope Awotona to look up to.
If you stay in Naija, you have Rabiu, Aliko, Tony to look forward to.
If you (or your children) are a tokunboh - born abroad and brought home - you (or your children) your have Otedola.
If you're fonee-speaking, you have Ogunlesi.
If your oral communication carries heavy dose of your native language, you have Dangote and Elumelu as inspiration.
Whose path to billionaire matches your (academic, career & life) philosophy?
PS: Otedola does not hold the view that school na scam, but he said he knew right from time it wasn't his thing.
If one person gets it by merit, why can that person not be you?
Until you approach life like this, there will always be someone or something you can point to or blame.
It will never make sense to you that maybe there’s something you could have done differently.
i stopped questioning God whenever something bad happened in my life.
i stopped worrying cus,
whenever i feel a load is too much to bear, i end up thanking God for putting me through it cus,
every hard time i've survived has introduced me to a blessing i couldn't have imagined.
I just encountered this on a service I just hosted on Render.
Easy fix for me was to ping a health endpoint in the service with UptimeRobot. very easy to set up, solved the issue for me
Render is so brutal the way it spins down your backend service. API takes more than a minute to get back up
1
4
127
Buchy retweeted
Ask yourself: Am I struggling because the task is hard, or because I’m too arrogant to go back and learn the basics?

















