DZone
Database Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Database Zone > Making PostgreSQL Real Time With Realm

Making PostgreSQL Real Time With Realm

Realm recently launched a PostgreSQL connector, enabling the power of Postgres and real-time data syncs with Realm Mobile Platform.

Tom Smith user avatar by
Tom Smith
CORE ·
Mar. 27, 17 · Database Zone · News
Like (4)
Save
Tweet
7.35K Views

Join the DZone community and get the full member experience.

Join For Free

I recently had a great talk Paul Kopacki, CMO of Realm, a mobile platform that works on devices as a data store that developers may choose versus the default database (Core Data). Realm is an embedded object database that sits on the device and enables developers to write entirely in objects, rather than having to use object-relational mapping.

PostgreSQL is one of the most powerful and popular databases in use today and is increasingly used for systems of record in all types of organizations. This works well for many use cases, but things get difficult when you try to build a modern, reactive app connected to your Postgres database. Postgres is fast, but it’s just not designed for real-time, reactive mobile apps.

But Realm has just introduced a new PostgreSQL Data Connector. This new connector creates a simple two-way bridge between Postgres and the Realm Mobile Platform, effectively making Postgres real-time for mobile apps. Data flows reliably and in a fault-tolerant manner between Postgres and the Realm Platform, which then automatically handles real-time sync with your mobile apps. This means changes made on mobile clients are automatically reflected back to your Postgres database in real time, and data changes made in Postgres sync in real time with client-side databases. You can now easily make truly reactive mobile apps with PostgreSQL and Realm.

Mobile Platforms as an Alternative to REST APIs

The Realm Mobile Platform replaces traditional methods of using REST APIs to get data in and out of backend systems for use in a mobile context. Our automatic real-time sync service efficiently syncs only what has changed in the data model without the need for manual data requests or bandwidth-hogging polling. Realm automatically handles the real-time sync of your native objects—without the need for JSON—between clients and the Realm Object Server (the server-side component of the Realm Mobile Platform). The Realm Object Server can then provide the API integration point between your mobile application and PostgreSQL database to consolidate API management in the backend, where network issues are not a concern. This architecture reduces the number of API calls that each device must make and reduces the need for complex idempotent APIs that can handle unreliable network connectivity.

PostgreSQL Data Connector Demo

This video shows how you can link Postgres and Realm Mobile Platform.

Using sample data from a fictional DVD rental company, we’re able to modify inventory levels via a mobile app or within Postgres and see those changes sync in real time. It’s a simple example of how Realm can dramatically simplify making Postgres real time for your applications.


Realm connects your mobile app and Postgres with automatic real-time sync.

You can visit GitHub for the code and an in-depth overview of how to connect the Realm Mobile Platform and PostgreSQL to create reactive, real-time mobile applications with data stored in PostgreSQL.

PostgreSQL mobile app Object database

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Java’s Encapsulation - When the Getter and Setter Became Your Enemy
  • MACH Architecture Explained
  • Refactor Switch to a One-Liner
  • Architecture as Code With C4 and Plantuml

Comments

Database Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo