Common Terminology

While working with Realm, there are a number of commonly mentioned terms which should be well understood. They are detailed below for convenience.

Realm - An instance of a Realm Database container. Realms can be local, synchronized, or in-memory. In practice, your application works with any kind of Realm the same way. In-memory Realms have no persistence mechanism, and are meant for temporary storage. A synchronized Realm uses the Realm Object Server to transparently synchronize its contents with other devices.

Realm Platform - A combination of NoSQL based server and client components connected via a fast and efficient sync protocol to enable real-time, connected apps and services that are responsive and performance irrespective of network status. The Realm Platform has two major components: the Realm Database and the Realm Object Server.

Realm Object Server (ROS) - The server component of the Realm Platform. It mirrors the numerous Realm Databases on client devices. It functions as a middleware component in the mobile app architecture and manages data synchronization, event handling, and integration with legacy systems. The Realm Object Server can efficiently and simultaneously sync data across many devices and automatically resolve conflicts - all in real-time. The Realm Object Server is also at the core of our Realm Cloud offering.

Realm Cloud - A fully managed deployment of the Realm Object Server.

Instance - A single endpoint (or server instance) of a Realm Object Server. A single instance of the Realm Object Server can host many individual Realms and service many users. A standard Realm Cloud subscription allows three instances to be created.

Realm Studio - A developer and administrative tool for easily managing your experience with the Realm Platform. With it you can perform basic tasks like testing connectivity to an instance, browsing the data within a Realm, and viewing logs.

Full Synchronization - One of the two syncing methodologies when using the Realm Platform. When using full sync, the entire contents of a Realm are synced down to a client rather than a subset of the contents. Architectures which utilize this methodology are often segmented into many smaller sized Realms.

Query-Based Synchronization - One of the two syncing methodologies when using the Realm Platform. When using query-based sync, a subset of the contents of a Realm are synced down to a client based on a subscription query defined by the client (e.g. give me carobjects that are owned by my dealership). Architectures which utilize this methodology are often organized into fewer larger Realms which are shared amongst users with each user specifying a different query.

URLs

When working with the sync APIs, there are a number of URLs that are important to understand. These are used when setting up your Realms

Server URL / Auth URL - This URL is used for authentication with your Realm Object Server instance. It is a combination of three components. A prefix which indicates the communication protocol (httpor https), a server address, and an optional port (as configured in the server, typically 9080or 9443).

For a secured server (like Realm Cloud), it may look like: https://my-cloud-url.us1.cloud.realm.io

For an unsecured server (like a ROS running on your desktop), it may look like: http://localhost:9080

Realm URL - This URL is used for opening a Realm from your Realm Object Server instance. It is a combination of three components. A prefix which indicates whether the instance is secured (realm or realms), a server address, and the specific Realm path on the server (effectively a naming schema).

For a secured server (like Realm Cloud), it may look like: realms://my-cloud-url.us1.cloud.realm.io/userDatabase

For an unsecured server (like a ROS running on your desktop), it may look like: realm://localhost:9080/userDatabase

Realm Types

Realms are actually just files on disk. They are typically one of three types: full, reference, or partial.

Full Realm - A Realm file which is configured for full synchronization

Reference Realm - The master Realm file which is used in query-based synchronization. The reference Realm houses all of the data which is queried by end users. It exists only on the server. You might think of this as the database which you can create views from.

Partial Realm - When using query-based sync, a client will subscribe to a subset of the data which exists in the reference Realm. When it does this, it creates a partial Realm on both the client and the server. This partial Realm contains this specific client's view (or subset) of the data.

Data Connector vs Data Adapter - It is common to connect the Realm Object Server with various backend databases and services. To do this, Realm offers a number of prebuilt data connectors. Currently, we offer prebuilt data connectors for MSSQL, Postgres, and Kafka, with more in development. The underlying API which is used to create these connectors is available to all Realm Platform users so that a developer can build their own data connector. We refer to this API as the Data Adapter API.

Websocket - A computer communications protocol, providing full-duplex communication channels over a single TCP connection. Realm's sync technology relies on websocket connections being opened between the mobile client and the Realm Object Server. This allows data to be pushed or pulled to and from the mobile-client in a real-time and bidirectional way.