Client-Side and Mobile Data Persistence Questions

Storing data on devices and clients: embedded and mobile databases (SQLite and similar), local caching, offline-first persistence and sync, and durable save/state systems for applications and games. Covers constrained-storage design, conflict resolution on sync, and persisting state reliably outside a central server. Serves mobile and game development interviews.

MediumTechnical
83 practiced

In a Flutter app, describe strategies to ensure state remains consistent across multiple views/components while offline and after a background sync finishes. Cover patterns (BLoC, Provider, Redux), the single source of truth pattern, how to broadcast sync events, and how to reconcile server updates with optimistic local changes.

MediumSystem Design
82 practiced

Compare using SQLite (disk-backed, paged) versus an in-memory store (e.g., HashMap or in-memory Realm) for caching up to ~100MB user data on mobile devices. Analyze startup latency, memory pressure, query performance, battery/IO costs, durability, and recommended hybrid strategies for low-end devices.

MediumTechnical
69 practiced

Implement an in-memory LRU cache in Kotlin for Android that supports generics and provides O(1) get and put operations. The API should be:

class LruCache<K, V>(private val capacity: Int) {
  fun get(key: K): V?
  fun put(key: K, value: V)
}

Explain thread-safety considerations and how you'd extend it to a disk-backed cache.

MediumTechnical
74 practiced

In a React Native app using Redux for global state, describe a robust strategy to persist Redux state locally and keep it synchronized with remote server state. Discuss libraries (redux-persist), conflict resolution, rehydration ordering, partial rehydration, and how to avoid exposing stale/conflicting state to UI after app launch.

EasyTechnical
85 practiced

Describe TTL (time-to-live) and staleness strategies for client caches. Explain when to favor client-driven TTL, server-driven invalidation, or conditional requests (ETag/If-None-Match). Include how you'd expose staleness to UI (e.g., stale-while-revalidate) and how offline apps surface freshness to users.

Unlock Full Question Bank

Get access to all 33 Client-Side and Mobile Data Persistence interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.