Backend Integration & Services

The Realm Platform allows for easy integration with your existing backend whether that is databases, microservices, APIs, etc. There are three common ways to do this:

  1. Prebuilt Data Connectors (Postgres and MSSQL)

  2. Event Handler (similar to AWS Lambda)

  3. Writing your own data connector (using our adapter API)

  4. Server SDKs (Node.js and C# .NET Core)

  5. GraphQL (REST)

Which Option is right for you?

Prebuilt Data Connectors

If you already have an existing backend using Postgres or MSSQL, you'll find our prebuilt data connectors to be the fastest path forward. You may need to enable a few features on your existing database. After that, you'll choose what data you'd like to sync, define the relational schema as Realm models, and start syncing data. Our connectors support bidirectional sync out of the box. Learn more in the respective MSSQL Connector and Postgres Connector documentation.

Event Handler

One of the most powerful features of the Realm Platform is the ability to want to react to changes on the server which can trigger some kind of data processing or data push. Realm Platform offers the ability to register for data change events. This functionality is provided in the server-side Node.js and .NET SDKs via a global event listener API which hooks into the Realm Object Server, allowing you to observe changes across Realms. This could mean listening to every Realm for changes, or Realms that match a specific pattern. Use the event handler in situations where you want to respond to updates made to your data after it has been synced to the server.

Examples:

  • Pushing newly synced contacts from Realm Object Server to a MySQL Database

  • Sending newly synced string data to an external API for processing before re-writing it to the source Realm

  • Triggering an external API call to Twilio or Square

Learn more in the event handler documentation.

Writing your own Data Connector using the Adapter API

While we plan to continue to build out our prebuilt data connector inventory, it is possible that you have an existing database or backend which we do not currently support out of the box (i.e. MongoDB, MySQL, etc). The underlying API which is used in our data connector implementations is available for a developer user in our Server SDKs. We recommend using this API when transactional data is being synced or granular processing is required (since you will have access to each individual sync instruction).

Learn more in the data connector documentation.

Server SDKs

While our SDKs were developed with mobile first in mind, both our Javascript and .NET SDK can be used in a server environment in the Node.js environment and C# in .NET Core framework. If you choose to use our Event Handler or write your own data connector, you will be working with one of our Server SDKs. However, you are also welcome to use them generally to create your own server client. This is often chosen for tasks like a one-time or scheduled import of data from an existing data source into your Realm Object Server.

Learn more in the Server SDK documentation.

GraphQL

The contents of the Realm Object Server are made available via GraphQL endpoints so that you can call the Realm Object Server as if it is a traditional REST API. This is a common option for users who have a standard backend language of choice which is not natively supported by our SDKs (i.e. Java, Python, etc) or users who are more familiar with a typical REST API model.

Learn more in the GraphQL documentation.