Introducing the Amplify DataStore, a persistent storage engine that synchronizes data between apps and the cloud

Posted on: Dec 4, 2019

AWS Amplify announces Amplify DataStore: a queryable, on-device data store for web, IoT, and mobile developers using iOS, Android, and React Native. Amplify DataStore provides a programming model for leveraging shared and distributed data without writing additional code for offline and online scenarios, which makes working with distributed, cross-user data just as simple as working with local-only data - allowing developers to create rich app experiences.

Previously, AppSync addressed offline use cases by utilizing an on-device cache to store query results that have been previously returned from the cloud. AppSync’s implementation of on-device caching of query results enabled developers to create a broad range of offline capable apps. However, the data available to the app when a device was offline was limited to the contents of the cache. Therefore, developers were required to anticipate potential offline data requirements by issuing broader queries when the device was online. Now, by using Amplify DataStore, developers can build highly interactive, collaborative apps that support a wider range of offline use cases, providing more flexible access to local data. These use cases range from field service apps that allow searching, creating, and manipulating service requests when offline and real-time updates to chatrooms, whiteboards, and dashboards, to high performance use cases, such as those that require facial recognition algorithms that avoid network latencies by synchronizing ML models locally and optimized network utilization use cases such as those required by smart electricity meters that send per minute average data instead of collected data, with a local-first and familiar programming model that is easy for developers to reason about.

To provide these capabilities, AWS AppSync has released built-in support for advanced conflict detection and resolution strategies. When combined with the Amplify DataStore, developers have a simple programming model where they can easily reason about consistency and data integrity, and can interact with data seamlessly whether online or offline. These capabilities allow developers to interact with native domain objects in Java, Swift, and JavaScript which are automatically converted to GraphQL behind the scenes. AppSync also provides automatic delta synchronization and auto-merge on objects synchronized across devices using the GraphQL type system.  

You can start using the Amplify DataStore in web apps with the latest Amplify JavaScript clients now. The iOS and Android DataStore clients are currently in preview. For more details on the new Amplify DataStore features, refer to our blog post and the Amplify documentation.