~/lightning

From SQL to Flow: clean offline-first architecture with Kotlin 2.x

Lightningat AndroidMakers by droidcon 2026 · on Friday, 2026-04-10· at 10:55· [databases, kotlin]
slides:none on file

Claims a concrete offline-first system built with Kotlin 2.20+, Room, Flow, coroutines and WorkManager that actually works: GPS at 1,800 rows per 30 minutes drives chunked uploads with offset claiming to guarantee no duplicates eventual delivery, periodic WorkManager pings (>=15 min) pick up residuals, and retention auto-deletes to shrink DB and save battery. Uses zero-cost value classes, sealed sync states, guard conditions; replaces a 400-line monolith with a generic interface where each entity needs ~20 lines. Repo and app exist.

AI-written summary · about

  1. 0:00Introduction
  2. 1:05Offline-first challenges
  3. 2:10Requirements for sync
  4. 3:12Offline-first with Kotlin
  5. 4:36Fixing stringly typed code
  6. 5:39Sync status with sealed
  7. 7:04Database resilience
  8. 8:11Chunking and sync logic
  9. 9:15Generic sync contract
  10. 10:19Orchestrating entity syncs
  11. 11:02Residual data and WorkManager
  12. 12:27Sync lifecycle
  13. 13:08Battery-efficient sync
  14. 14:13Performance wins
  15. 14:55Generic architecture
  16. 15:37Open-source repo
  17. 16:20Final thoughts
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.