Part 1: The "Lie-Fi" Problem & The Offline-First Mindset
How Senior Engineers use SSOT, Room, and Flow to build resilient, production-grade apps that never feel broken. TL;DR The Problem: “Online-first” apps break in “Lie-Fi” (zombie connections). The Fix: Move from Request-Response to Single Source of Truth (SSOT) . The Flow: UI observes Room → Network updates Room → UI reacts. Priority: Choose Availability (AP) over strict Consistency. 1. The “Online-First” Fallacy In an online-first model, the UI becomes tightly coupled to the variability of network conditions . This creates a fragile experience where usability is tethered to the health of a remote socket. The “Zombie” Connection (Lie-Fi): The TCP socket hasn’t timed out, but no data is moving. The app waits for an onResponse that may take tens of seconds (or never) to resolve. To the user, the app isn't "waiting"—it's broken . Real-World Failure Scenario: User “Likes” a photo → Network stalls → Heart doesn’t tur...