
Backend Engineer | Web3 | Golang | Java | Laravel | Mod @BerfBased
127.0.0.1
Joined May 2018
- Tweets10.8K
- Following2.9K
- Followers1.8K
- Likes52.1K
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
someday, we’ll talk about how useless SOME tech events in Nigeria are.
terrible inexperienced speaker row, zero value.
just a meet and greet for developers to show off their startup’s merch.
this exchange is so insanely painful to watch
> "your company was generating 22% of its revenue from singapore. why did you stop reporting that?"
> "well senator, singapore is a billing and procurement hub, the chips are actually going elsewhere"
> "BUT you were generating 22% of your revenue from singapore"
> "that's precisely why we changed the reporting, senator. our investors wanted to know where our customers actually are"
> "so why are you hiding the sales to singapore?"
> "we're not hiding anything, senator. companies have their procurement departments in singapore but the chips go elsewhere, including america"
> "BUT you were generating 22% of your revenue from singapore and now you're not reporting it"
> "yes senator, because singapore is a billing and procurement hub. we changed the reporting to give our investors a better understanding of our business"
> "so why are you lying to your investors?"
> "senator, we literally changed the reporting because our investors wanted more transparency"
> "i think it's painfully obvious that you've been dishonest to your investors"
> ...
To anyone who cares to listen.
Please if you intend to relocate abroad either for work or study, don't plan your future around earning minimum wage.
Dreams are free. You should dream bigger for yourself.
It's not funny to be poor anywhere in the world. You may think you'll be better off especially when your baseline is Nigerian minimum wage and you constantly convert from euro to naira. You will SPEND euro!
I don't know what you want for yourself, but you should want something more than a life of poverty. Poverty in a country where your skin colour gives you away easily as a foreigner is different from any type of poverty you may have experienced in your home country.
Buchy retweeted
You have one life. Start living like the person you want to become. One day, you'll look back and realise you've become that person.
It works like mad did this over and over again.
Anybody that choose to work at Seplat or NNPC over 300 million Naira can never get rich
You have two options on the table;
1. Been an entrepreneur and building your business from scratch, start up capital is 300M.
2. Been an intrapreneur and building others business, you will start from been a fresh employee in Seplat, NLNG or NNPC and walk your way up.
Which would you want to start your life journey from?
Buchy retweeted
Stop dwelling on your losses, they’re a part of life. We all have them.
Please, do me a favor. You can’t look backwards. I promise you .. your interest in dwelling about yesterday is stopping you from attacking today, which is keeping you away from being happy tomorrow.
The greatest cancer, pandemic, illness, issue, darkness that most of you are facing is your infatuation with yesterday that you have no control over … everyone’s necks are broken out here from looking backwards.
If you’re not doing, if you’re not going for it, you’re just crying … and you’re crying because you’re not doing even though you know the answer. You’re either insecure or your dwelling about “missed opportunities” … or the worst two words to start a sentence: “I wish.”
Dwelling is the poison of society. This should be shared at a record rate, because everyone has someone in their family or inner circle that can’t stop complaining about the past. The greatest gift we can give someone we love is the ability to let go of something that isn’t contributing to their tomorrow.
Buchy retweeted
Now i understand why older people are calmer. after you’ve died enough times inside, you learn to breathe, let go and just be.
Nigeria's tech ecosystem is heading in a new direction over the next decade.
A new generation of companies is emerging, particularly in cloud infrastructure, SaaS, and deep tech.
We're gradually moving beyond the fintech-heavy era, and I think we're about to see a whole new wave of innovation come out of Nigeria.
Exciting times ahead.
crazy!
RAISED: Chowdeck (@chowdeck) has raised $21 million in Series B funding.
The food delivery startup is doubling down on its ambitions to transform on-demand delivery across Africa.
In a special edition of Tech This Week, Chowdeck’s Co-founder & CEO, Femi Aluko (@LordBinary_), joins me to discuss the raise and what comes next for the company.
Join us SOON live on X and YouTube.
76
Buchy retweeted
Today my teacher said to me 'Only one in a million make it as a footballer' I told him I'm that 1 ❤⚽
Made a big boy purchase 😭🙏🏾
MacBook Pro M4 Max
64GB Ram
1TB Storage.
God is the Greatest 🙏🏾🙏🏾🙏🏾🙏🏾
Let the cooking continue.































