Isolating Account Data in Cash App With Coroutines & DI
summary
Cash App moves from a single global DI graph to a phased DI graph that binds a coroutine scope per component, tying long‑running work to account vs onboarding lifetimes. Tried Compose + Molecule; Compose hung so engineers roll a custom collectLatestUndispatched. Storage moves from shared preferences to sandboxed storage links in SQLite with signin‑group GC. Migration spans ~June 2023–March 2025, touches ~20 mobile teams, and ships successfully after iterative AB testing and leak hunts.
AI-written summary · about
chapters (19)
- 0:00Introduction
- 1:06Cash App login flow
- 3:17Evolving customer needs
- 8:16New architectural goals
- 12:13Migration plan and Dagger
- 13:59Coroutine scopes and concurrency
- 17:55Why structured concurrency
- 20:46Storage isolation challenges
- 25:43File system sandboxing
- 27:29First attempt failures
- 29:37Simplified storage design
- 31:21UI glitches during swaps
- 32:24Memory leaks with LeakCanary
- 33:07Feature flagging struggles
- 35:55Debugging with traces
- 37:39Eliminating shared preferences
- 39:05Why two years
- 41:10Lessons learned
- 43:39Q&A
related talks
45mMigrating a large-scale banking app to Compose
43mWhat's New in Compose Multiplatform
40mCompose Without Flow: Unidirectional State with Snapshots and Coroutines
35mSweet Architecture
32mArchitecture at Scale
49mBuilding for the future at Snapchat
44mState Machines and Hopeful Dreams
31mUnidirectional Data Flow with...
