Exercises
Explore the architecture and engineering practices behind reliable offline-first mobile applications. This quiz covers local data ownership, synchronization queues, optimistic updates, conflict resolution, tombstones, idempotency, retry strategies, delta sync, logical clocks, and recovery from interrupted operations. Questions range from foundational concepts to practical architecture scenarios involving unreliable networks and concurrent edits.
Answer the questions below and check the explanation for each answer.
0/20 answered
Auto audio on: the next questions will be read aloud when you click Continue.
The UI should primarily observe the local database. Network synchronization updates that database in the background, allowing the app to remain responsive and useful without connectivity.
Pending operations should be sent when connectivity returns. The client then reconciles acknowledgments, conflicts, or updated server data with its local database.
An outbox durably records unsent local operations. Because the queue is persisted, pending changes survive app restarts, crashes, and temporary loss of connectivity.
An idempotent operation can be repeated without creating additional effects. An idempotency key lets the server recognize and safely answer a duplicate request.
A client-generated stable ID allows records, relationships, queued operations, and retries to refer to the same entity before and after synchronization.
Field-level merging can retain independent changes, such as one device changing a phone number while another changes an address. Whole-record replacement could unnecessarily discard one edit.
A tombstone represents a deletion so that other replicas can learn about it. Immediately removing every trace could cause an older copy from another device to recreate the item.
A synchronized deletion marker tells replicas that the item was intentionally removed. The marker must be retained long enough for relevant clients to observe it.
Exponential backoff spaces retries farther apart after repeated failures. This conserves device resources and avoids overwhelming a recovering network or server.
Jitter adds randomness to retry delays, spreading requests over time. It helps prevent a thundering herd of clients from retrying at the same instant.
Delta sync transfers changes made after a known cursor, token, timestamp, or version. This usually reduces bandwidth, processing, and battery use compared with full synchronization.
The new token should be committed after the delta is applied successfully, ideally in the same transaction. Advancing it too early could cause changes to be skipped after a crash.
Device clocks may drift or be set incorrectly, so a later timestamp does not always represent the causally later edit. Timestamp-only last-write-wins can therefore discard valid work.
Logical clocks represent ordering and causality without relying on perfectly synchronized physical clocks. If B incorporates knowledge of A, the system can identify that A happened before B.
The client submits its expected version with the update. The server accepts it only if the current version still matches, allowing concurrent modifications to be detected.
The mismatched version proves the server record changed after the device read it. The server should report a conflict so the client can fetch, merge, or ask the user to resolve it.
An atomic transaction commits both actions or neither. This prevents a crash from saving visible local data while failing to queue the operation needed to synchronize it.
One atomic transaction ensures the record update and outbox insertion succeed or roll back together. A crash cannot leave only one of the two persisted.
Removing an operation before confirmed acceptance risks data loss. It should remain durable until the server acknowledges it and the client safely records the resulting state.
Applying the batch and checkpoint atomically means either all changes become visible or none do. After a crash, the client can safely retry without presenting a partially committed batch.
Video Courses
Ideal for beginners
recommended
Advanced
recommended
Thousands of online courses in video, ebooks and audiobooks.
To test your knowledge during online courses
Generated directly from your cell phone's photo gallery and sent to your email
Download our app via QR Code or the links below:.
+ 10 million
students
Free and Valid
Certificate
60 thousand free
exercises
4.8/5 rating in
app stores
Free courses in
video and ebooks