Persist user data in local storage and synchronize with the cloud when connected so that client-side changes are published as events and cloud-side changes are retrieved from materialized views.
Offline-first database
Context, problem, and forces
In cloud-native systems, the presentation layer lives on the client and the client device is more and more mobile. Users have more than one device, including phones and tablets and, to a decreasing degree, traditional desktops. The presentation layer must communicate with the backend component to send and receive data and perform actions. Mobile users frequently experience spotty connectivity, which increases latency and often leaves them completely disconnected.
The CAP theorem...