Docs Menu

Docs HomeRealm

Stream Data to Atlas - C++ SDK Preview

On this page

  • Sync Data Unidirectionally from a Client Application
  • Define an Asymmetric Object
  • Connect and Authenticate with an App Services App
  • Open a Realm
  • Create Asymmetric Objects

You can use Data Ingest to stream data from the client application to a Flexible Sync-enabled Atlas App Services App.

You might want to sync data unidirectionally in IoT applications, such as a weather sensor sending data to the cloud. Data Ingest is also useful for writing other types of immutable data where you do not require conflict resolution, such as creating invoices from a retail app or logging application events.

Data Ingest is optimized to provide performance improvements for heavy client-side insert-only workloads.


To stream data from the client to your backend App, you must connect to an App Services backend and authenticate a user.

Changed in version 0.2.0: app.login returns std::future instead of std::promise

Changed in version v0.4.0-preview: Replaces deprecated realm::App(...) with realm::App(const realm::App::configuration&)

auto app = realm::App(APP_ID);
auto user = app.login(realm::App::credentials::anonymous()).get();


Mixed Object and Asymmetric Object Types

You cannot read, query, or delete an asymmetric_object from a realm, so asymmetric objects are incompatible with bi-directional Flexible Sync or local realm use. You cannot open a single synced realm to manage both regular objects and asymmetric objects - you must use different realms to manage these different object types.


Once you have an open realm, you can create an asymmetric_object and set its values as you would a regular object. However, you cannot read or delete these objects. Once created, they sync to the App Services backend and the linked Atlas database.

Atlas Device Sync completely manages the lifecycle of this data. It is maintained on the device until Data Ingest synchronization is complete, and then removed from the device.

←  Set the Sync Client Log Level - C++ SDK PreviewLogging - C++ SDK Preview →
Share Feedback