News

Realm Open Sources Mobile Database, Grows It into Enterprise Platform

Realm has fully open sourced its mobile database while adding an object server to offer a complete enterprise mobile platform.

Realm uses object database technology -- it describes its offering an "embedded object database at the core level" -- to provide an alternative to the SQLite and Core Data databases typically used in iOS and Android apps. The Realm database hit version 1.0 in May.

That object technology is key to the new Object Server component just added by the company to turn its mobile database into a mobile platform, with ready-made app back-end functionality.

Object Server provides that back-end functionality through server-side event handling and what the company calls "live objects" that keep data in sync.

"Live objects mean that the data objects on the device are always kept fully synchronized with the data objects on the server," the company said in a post today. "Synchronization happens automatically and seamlessly -- there's no networking code to write -- and is very efficient because only the changes are transmitted, not entire objects. The Realm platform also handles conflict resolution, so competing changes to shared live objects are resolved deterministically. It does this automatically by default with preset rules, and this mode will handle most use cases, but you can also easily create custom conflict resolution rules."

The Realm Mobile Platform
[Click on image for larger view.] The Realm Mobile Platform (source: Realm)

The new platform thus frees up developers from writing networking code and simplifies the creation of complicated apps that provide real-time collaboration or messaging, for examples, "that were previously only possible for organizations with virtually unlimited IT and developer resources."

The technology also addresses the mobile-specific problem of intermittent connectivity, as device database objects are instantly synchronized with their server-side counterparts when network access is restored after being interrupted.

Along with announcing the Realm Mobile Platform, the company said it's open sourcing Realm Core, making the Realm Mobile Database fully open source as of today, with code provided on GitHub. Previously, other components of the system were open source, but not Realm Core, which is the core database component shared across all the language-specific versions of the Realm Mobile Database such as Java for Android, Objective-C and Swift for iOS -- plus React Native and Xamarin, two approaches for cross-platform development based on JavaScript and C#, respectively.

"The Mobile Database is critically important to us, both as a component to the new platform and as a standalone database option for mobile developers, and we'll continue to have engineering teams dedicated to maintaining and improving Realm Java, Realm Objective-C, Realm React Native, Realm Swift and Realm Xamarin," the company said. Speaking of which, the company said platform support for React Native and Xamarin is not yet in place, but is coming.

The new platform is available in two versions: a free-forever Developer Edition, now in an open beta program and available for immediate download; and the Enterprise Edition, now in a closed beta program (developers can apply to partake). Both are expected to come out in 1.0 editions by year's end.

That enterprise offering is distinguished by enhanced functionality such as server-side event handling that can trigger code to run upon detecting a change in a database object.

"Perhaps a user enters a coupon code while filling out an order form," the company explained. "This is captured locally as a change to the device-side coupon object, which syncs to the server instantly. That specific change causes the event handling framework to trigger a check of the coupon code against valid codes, updating the server-side coupon object with a response about the validity. This response is then synced back down to the device-side coupon object triggering a notification that updates the UI."

Along with data synchronization and event handling, the Enterprise Edition also features simple authentication and access control, along with other enhancements over the free Developer Edition. The platform can run in cloud-based or on-premises implementations and is available for MacOS and Linux, but not Windows. Pricing is dependent upon deployment size.

About the Author

David Ramel is an editor and writer at Converge 360.