Exercises

Offline-First Mobile Data Synchronization

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

  1. 1

    In an offline-first architecture, which data source should normally provide the app's immediate UI state?

  2. 2

    The diagram shows a user edit being saved locally and then added to a pending operations queue. What should happen when the device regains connectivity?

    Question 2
  3. 3

    What is the main purpose of an outbox table in offline synchronization?

  4. 4

    In the illustrated sync timeline, the server applies an operation but the acknowledgment is lost. The client later retries it. Which API property prevents the operation from being applied twice?

    Question 4
  5. 5

    Why should a client assign a stable unique identifier to a new record before it has been uploaded?

  6. 6

    Two devices edit different fields of the same contact while offline, as shown. Which strategy can preserve both non-overlapping changes?

    Question 6
  7. 7

    What is a tombstone in a synchronized data system?

  8. 8

    The sync diagram shows a deleted note disappearing locally, while an offline tablet still holds an older copy. What prevents the tablet from later resurrecting that note?

    Question 8
  9. 9

    Why is exponential backoff commonly used when retrying failed synchronization requests?

  10. 10

    A retry chart shows many clients using identical delay intervals and sending requests simultaneously after an outage. What addition best reduces these synchronized retry spikes?

    Question 10
  11. 11

    What does delta synchronization transfer?

  12. 12

    The image shows a sync token leading to three changed records rather than the entire dataset. What must the client do only after applying the returned changes successfully?

    Question 12
  13. 13

    What is the key limitation of resolving conflicts solely by wall-clock timestamps?

  14. 14

    In the diagram, operation B was created after receiving operation A. Which relationship do logical clocks help identify?

    Question 14
  15. 15

    What does optimistic concurrency control commonly require when updating a server record?

  16. 16

    The server record is at version 8, but a device submits an edit based on version 7. What should an optimistic concurrency check do?

    Question 16
  17. 17

    Why should updating local data and inserting its outbox operation usually occur in one database transaction?

  18. 18

    The image shows a crash between a local record update and creation of its outbox entry. Which design would eliminate this failure window?

    Question 18
  19. 19

    When should an operation normally be removed from a persistent sync queue?

  20. 20

    A sync process downloads records, writes half of them, and then the app crashes. Which approach best prevents users from seeing a partially applied sync batch?

    Question 20

Video Courses

Courses related to this topic

See all video courses

Download the App now to have access to + 5000 free courses, exercises, certificates and lots of content without paying anything!

  • 100% free online courses from start to finish

    Thousands of online courses in video, ebooks and audiobooks.

  • More than 60 thousand free exercises

    To test your knowledge during online courses

  • Valid free Digital Certificate with QR Code

    Generated directly from your cell phone's photo gallery and sent to your email

Cursa app on the ebook screen, the video course screen and the course exercises screen, plus the course completion certificate