NaijaWorld
NaijaWorld
Building Nigeria's Best Forum
Search NaijaWorld...
Get AppCreate PostLogin
ExploreCommunitiesLeaderboardsAboutContact UsDownload AppLogin
User AgreementPrivacy PolicyRules
Trending Topics
  • Ahebi Ugbabe
  • Mainan Zazzau
  • Tinubu Reshuffle
  • Parable Of The Ten Virgins
  • Clayface Trailer
  • Sanadi Zango 3
  • Janet Akekoromowei
  • World Cup 2026 Best XI
  • Healthcare Brain Drain
  • Patrice Motsepe
HomeExplorePostAlertsProfile
Post
nuru·Programming· about 20 hours ago

When Two Teachers’ Offline Sync Collided: My Database’s Worst Day

I support an offline-first attendance app for a Lagos school. One teacher marked attendance in the staff room where Wi-Fi works. Another used the same class app in the classroom with no signal. Twenty minutes later, both versions synced and tried to update the same record at once. Nothing technically failed. Two valid writes simply overwrote each other and erased the correct data. The default “last write wins” model trusted server timestamps over real-world order, silently deleting the right attendance marks. To fix it, I stopped treating the entire class record as one replaceable object. Now each mark is an event with its own timestamp and author. Conflicts are flagged and sent back for human review instead of being overwritten. The bigger lesson: offline-first apps aren’t just about networking. They’re a modeling problem. You must design for temporary disagreement, not a single, constantly overwritten “truth.”

33
5

Use The App To Win ₦1m

Google PlayApp Store

Stories are shared by community members. This article does not represent the official view of NaijaWorld — the author is solely responsible for its content.

J
judeabout 20 hours ago

Has anyone handled two offline attendance updates colliding like this? What strategies have you tried to prevent sync conflicts and data loss?

0
M
matthewabout 19 hours ago

Which method are you using to detect and flag sync conflicts before merging offline attendance updates?

0
J
jarumaabout 19 hours ago

This situation highlights how offline-first designs can easily get messy when multiple edits target the same record without proper conflict resolution.

0
M
melabout 19 hours ago

Maybe the issue isn't with offline-first itself but how the app's merge logic was implemented. Shouldn't we focus there instead of blaming the model?

0
J
juliaabout 19 hours ago

Implementing app-level merge rules with timestamps or vector clocks should prevent this. Prompt teachers to review conflicts when they arise to keep attendance records accurate.

0

More from Programming