WavebreakMediaMicro - Fotolia
MongoDB Realm Sync simplifies cloud data synchronization
MongoDB put into general availability its mobile Realm database to data synchronization service, easing the challenge for developers to connect data from the edge to the cloud.
MongoDB put its Realm Sync service into general availability on Feb. 2, enabling developers to synchronize mobile data with the cloud.
MongoDB acquired the Realm mobile database in April 2019 and has been steadily expanding its capabilities ever since. In June 2020, the NoSQL database vendor released the MongoDB Realm platform with capabilities to enable mobile developers to build services.
With the general availability of MongoDB Realm Sync, developers can now more easily synchronize data collected from a mobile device with the MongoDB Atlas cloud service.
How MongoDB Realm Sync enables cloud data synchronization
Among the organizations that have been using MongoDB Realm Sync is Humanitix, a Sydney-based vendor that provides a not-for-profit ticketing platform that is used around the world, primarily for events that raise money for education projects.
Joel Berta, senior developer at Humanitix, explained that one of the key activities at events is checking in people and scanning codes printed on tickets -- often in environments with little or no network connectivity.
Berta said that originally built the app to hit REST API endpoints. However, he said that approach proved problematic due to inconsistent connectivity inherent in mobile networks. That's what led Humanitix to rebuild the app with an offline-first approach.
"We are building an app that is offline-first and Realm is providing the power that enables us to do this easily and at scale with our current tech stack," Berta said.
The way the Humanitix app works now is event organizers log in to the app and their events are automatically synced via Realm. Berta explained that building the app with an offline-first approach addresses the problem of inconsistent connectivity while also improving the responsiveness of actions done within the app.
"Using Realm we can rapidly develop an offline-first solution that also has native integration with our database provider, MongoDB Atlas," Berta said. "Not only that, all the complication that is intrinsic to building an offline-first solution is solved using MongoDB Realm."
Joel BertaSenior developer, Humanitix
MongoDB was not Humanitix's first choice for building an offline app. Berta noted that Humanitix first built its own approach with the open source SQLite embedded database before making the decision to move to MongoDB Realm and that building and maintaining Humanitix's own code was difficult.
"Mainly we found issues correctly syncing the local data back up to our database," Berta said. "There's a ton of complexity that comes from addressing problems like conflict resolution when syncing multiple devices for the same event, so we've moved away from building and maintaining our own solution. It just wasn't worth the dev hours."
MongoDB Realm development moving forward
Sahir Azam, chief product officer at MongoDB, explained that MongoDB Sync service is a cloud service that was developed to help enable mobile data synchronization with the MongoDB Atlas cloud.
Azam noted that there is a free tier available for MongoDB Realm Sync. It is intended for lightweight applications and for developers to try out new projects. As usage grows, that's where cost come in and users will move up to a paying tier.
From a platform perspective, one of the things that MongoDB Realm Sync helps to enable is data aggregation, from mobile into the cloud. Bringing in data from multiple sources, even different databases, as well as streaming data via Apache Kafka, is a key part of MongoDB's overall strategy, Azam noted.
"MongoDB has always been known for aggregating and being a flexible data model for multiple source data sets," Azam said. "In many ways, and this Realm Sync capability just builds upon that story with connecting it all the way to the edge."