Introduction - Amplify DataStore: Use Cases and Implementation

Introduction

If you develop applications, you need to think about low-latency message transmission and offline synchronization. Your applications must not only deliver the required principal functionality, but also must work under conditions where data needs to be shared in near-real-time or in locations without internet connectivity.

For example, if someone sends a message on a chat application while the device lacks internet connectivity, the application must store that message on the device. Once connectivity is reestablished, the application must transmit it. This process can be complex to achieve, given that developers need to implement the code that manages the device connectivity, stores the information, and retries every time the internet access changes.

To meet these requirements, Amplify DataStore provides a programming model for leveraging shared and distributed data without writing additional code for offline, real-time, and online scenarios. This model makes working with distributed, cross-user data just as simple as working with local-only data. It also allows your application developers to focus on features that add business value rather than undifferentiated code to handle caching, reconnection, data synchronization, and conflict resolution.

Amplify DataStore can be used as a local data store in web and mobile applications without connecting to the cloud. When paired with AWS AppSync, Amplify DataStore synchronizes the application data with an application programming interface (API) when network connectivity is available. By automatically controlling versioning, conflict detection, and conflict resolution; Amplify DataStore automatically leverages AWS AppSync to achieve near-real-time synchronization between the devices and the cloud backend.

This guide discusses practical, real-life scenarios where developers, solutions architects, and organizations can adopt Amplify DataStore in their mobile and web application development process.