Docs Menu

Docs HomeRealm

Device Sync - Kotlin SDK

On this page

  • Flexible Sync

Atlas Device Sync automatically synchronizes data between client applications and an Atlas App Services backend. When a client device is online, Sync asynchronously synchronizes data in a background thread between the device and your backend App.

When you select Flexible Sync for your backend App configuration, your client implementation must include subscriptions to queries on queryable fields. Flexible Sync works by synchronizing data that matches query subscriptions you maintain in the client application.

A subscription set contains a set of queries. Realm Flexible Sync returns documents matching those queries, where the user has the appropriate permissions to read and/or read and write the documents. If documents match the query, but the client does not have the permission to read or write them, they do not sync to the client application.

You can form queries using Realm Query Language.


Flexible Sync does not support all the query operators available in Realm Query Language and the SDK's query engine. See Flexible Sync RQL Limitations for details.

Subscription sets are based on object type. You might have multiple subscriptions if you have many types of Realm objects.

To use Flexible Sync in your client application, open a synced realm with an initial set of subscriptions to determine which documents to sync.


Device Sync supports two Sync Modes: Flexible Sync, and the older Partition-Based Sync. If your App Services backend uses Partition-Based Sync, refer to Partition-Based Sync - Kotlin SDK.

We recommend new apps use Flexible Sync.

←  Database Internals - Kotlin SDKConfigure & Open a Synced Realm - Kotlin SDK →

On this page

Share Feedback
© 2023 MongoDB, Inc.


  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.