Working without a connection.
WHAT LEVELS OF SUPPORT EXIST
- Read-only: previously retrieved data remains available
- Queued actions: changes made offline are sent later
- Full synchronisation: data changed on both sides is reconciled
WHAT TO CHOOSE
The simplest that meets the need.
WHY
Full synchronisation is substantially harder than it appears.
WHAT A LOCAL DATABASE PROVIDES
The application reading from local storage, with the network updating it.
WHY THAT PATTERN
The interface never waits on the network, and works offline by construction.
WHAT TO RECORD FOR QUEUED ACTIONS
What the action was When it was created Its status
WHAT TO HANDLE
Actions that fail permanently Actions superseded by later ones The application being terminated with actions pending
WHAT CONFLICTS ARE
The same data changed in two places.
WHAT STRATEGIES EXIST
Last write wins, which is simple and loses data Server authority Merging, where the data allows Asking the user
WHAT TO DECIDE
Per data type, deliberately.
WHAT TO TEST
Making changes offline, then reconnecting.