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.”
Stories are shared by community members. This article does not represent the official view of NaijaWorld — the author is solely responsible for its content.

