Buchy (@dev_buchi) header
Buchy (@dev_buchi) profile picture

Backend Engineer | Web3 | Golang | Laravel | Mod @BerfBased

127.0.0.1
Joined May 2018
Photo by Buchy (@dev_buchi)Photo by Buchy (@dev_buchi)Photo by Buchy (@dev_buchi)Photo by Buchy (@dev_buchi)Photo by Buchy (@dev_buchi)Photo by Buchy (@dev_buchi)Photo by Buchy (@dev_buchi)Photo by Buchy (@dev_buchi)Photo by Buchy (@dev_buchi)Photo by Buchy (@dev_buchi)
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
2
1
3
122
Replying to @Mrjags__ @egi_nupe
ur father!
1
Replying to @sagespells
Justin Timberlake - Mirrors
51
Replying to @Somto_babey
Tinubu will round up and hand over the office to Peter Obi in May for sure
77
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".....
Dear Obi, Tell us how those 10k health centers will b built
1
52
Replying to @EmmaAnu239762
wishing you the best Emma, go win! 馃憫
1
23
Replying to @UgwunnaEjikem
agree! 100%
35
Replying to @Meedways1
but your "Lord and personal savior" has drug trafficking-related charges in Chicago and you've been quiet about it 馃し
1
10
Replying to @TheAjakeManger
correct question. y'all should also tag Kenneth Okonkwo to this question.
1
1
152
Why else would men like Yul Edochie and Kenneth Okonkwo be so vocal about their selfish political alignments?
12
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
7
We had natives betraying their communities and families for favor from the white man - selfish men who were willing to sell out their own for personal gain, or the opportunity to be installed as a puppy ruler with no real authority or autonomy.
1
13
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
33
Replying to @segalink
what a shameless dumbass!
19
Replying to @TheRealJamieKay
Tenet, Interstellar
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
89
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.
109
932
44
4,467
188,164
Buchy retweeted
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鈥檚 something you could have done differently.
2
44
177
2,365
as for me, I鈥檒l be successful.
as for me, I鈥檒l be successful.
1
44
Buchy retweeted
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.
2
3
20
428