Offline synchronisation in field applications
How to design a field application that works without a network and never loses data.

In field applications the network is not an assumption but an exception. The architecture has to start there rather than be patched later.
Write events, not state
Store each user action as a local event with a unique id and a version number. Synchronisation is then replaying those events, which makes a duplicate send harmless.
Resolve conflicts on the server
The conflict rule belongs on the server and must be documented. "Last writer wins" is acceptable only when it was chosen deliberately.
A durable queue
The outbound queue must live on disk, not in memory — the app may be closed before connectivity returns.



