Data / Programming Languages

Realm’s Mobile Development Platform Links to PostgreSQL to Tie into Enterprise Data

21 Mar 2017 1:47pm, by

Realm, the mobile platform that helps developers create real-time reactive apps, on Tuesday unveiled its new connector with the PostgreSQL database management system, in an attempt to better link one of the world’s most popular databases with modern mobile applications.

“Mobile applications need to be reactive and collaborative to be compelling, but they also need to be connected to legacy systems to be relevant,” Alexander Stigsen, co-founder and CEO of Realm, said in the announcement.

The Realm Mobile Platform is used in the NCAA March Madness app, as well as those from Starbucks, the NFL, and Budweiser. Netflix chose it to help enable offline capabilities for its users.

Realm chose to create the connector to 20-year-old Postgres because of its wide use among enterprises. Links to other widely used enterprise systems are in the works, Stigsen said.

“There’s a lot of good reasons for using [Postgres], but like a lot of technologies that have been around since before the mobile revolution, it’s not designed for mobile. It’s slow. It requires developers to write requests, then get a response back before a developer can change the data the app is working with. If you’re trying to build a very snappy, collaborative type of experience, Postgres requires writing a whole bunch of code to manage that,” said Paul Kopacki, Realm chief marketing officer.

In code, you’re asking the database for a bit of information and waiting for that information to come back, he said. And you’re doing that at the moment the user is trying to have their experience.

“It kind of works, but it’s kind of clunky,” he said, adding that used in mobile applications, they tend to be brittle and inflexible.

Using the Realm Mobile Database and its associated object synchronization and event handling server, the connector links to your data and makes sure every change on the mobile device is transmitted to the database and vice-versa, synchronizing out in real time to all the mobile devices, Stigsen said.

Postgres talks to the Realm platform and Realm keeps the application up to date, in real time, in the background automatically. It requires no extra code by the developer, no brittleness, no complicated permutations of translating data from Postgres to the mobile application, Kopacki said.

‘Live’ Objects

In a previous story with The New Stack, senior vice president of product development at EnterpriseDBMarc Linster pointed to JSON-B as a feature in Postgres for better enabling mobile.

“You can use JSON-B all the way from the browser to the database, all the way through the stack. Other databases require you to deconstruct documents for the mobile browser, then do transactions from the bits and pieces. In Postgres, you can use the whole document,” Linster said. EnterpriseDB sponsors the open source project and offers a commercial distribution of PostgreSQL.

Most Postgres companies are focused on scaling the popular database rather than improving its use with mobile, Kopacki contends. Realm is considered an alternative to SQLite and Core Data as a mobile development tool, offering real-time data synchronization driven by the database in the background.

The Realm Mobile Platform is a lightweight object container which it calls Realms where data can be queried and filtered, interconnected and persisted. Objects are native, the company explains:

“You don’t have to copy objects out of the database, modify them, and save them back — you’re always working with the “live,” real object. If one thread or process modifies an object, other threads and processes can be immediately notified. Objects always stay in sync.

Objects on the Realm Object Server will be downloaded as the application needs them — then the local copy of the Realm [container] will be kept fully synchronized with the Object Server’s copy.

Realms always operate in an “offline first” fashion: reads and writes take place on the local copy of the Realm. Syncing is automatic and fully transactional, and takes place as soon as a data connection is available.”

Ensuring user experience if a connection is spotty or lost is another aspect key to Realm, something not possible with Postgres, Kopacki contends. Realm, on the other hand, uses an embedded database on the client side where synchronization takes place in real time.

“If you lose the signal, you’ve already got the most up-to-date dataset because in the background Realm is constantly keeping things synchronized,” he said.

“So if the train goes into a tunnel, you can keep working away. If you’re using an e-commerce app, you can continue with the transaction, and when you come out of the tunnel, it will just pick right back up where it left off and re-synch. You won’t even know. It won’t feel that different,” he said.

The Realm Mobile Database is available for Android (Java), iOS (Objective-C and Swift), Xamarin, React Native and Node.js.

The Realm Object Server is available for Red Hat/CentOS and Ubuntu Linux, as well as on Amazon EC2.

Red Hat is a Sponsor of The New Stack.

Feature Image: “Mobile” by Daniel Julià Lundgren, licensed under CC BY-SA 2.0.


A digest of the week’s most important stories & analyses.

View / Add Comments

Please stay on topic and be respectful of others. Review our Terms of Use.