News

Open Source Realm Mobile Database Hits Version 1.0

Citing advantages over the SQLite and Core Data databases commonly used in iOS and Android apps, Realm today launched version 1.0 of its namesake "mobile-first database."

Realm 1.0 uses native objects to store data, with Java, Objective-C, Swift, React Native and Xamarin versions, positioning itself as a superior alternative to SQLite -- embedded on all Android devices and also used on iOS -- and Core Data, a library produced by Apple that's based on SQLite.

"Realm is not an ORM [object-relational mapper], and is not built on top of SQLite," its literature says. "Instead we've built a full database for mobile app developers, one that uses native objects that are dynamically mapped to a full, custom database engine (not just a key-value store). This allows us to provide a simple API while even enhancing performance. With Realm, you can model complex data, link objects in a graph and compose advanced queries."

Realm board member Andy Vitus, a partner at Scale Venture Partners, picked up on the SQLite comparison. "The legacy standard for mobile databases, SQLite, was designed over 15 years ago for use on board the U.S. Navy's guided missile destroyers," he said in a statement. "The phrase 'platform shift' does not begin to adequately capture the difference between that environment and a modern cell phone."

While Realm claims it typically outperforms SQLite solutions, it says its main selling point for developers is that it's easy to use.

"Realm's primary focus has always been ease of use," it said. "Developers tell us they switch even large apps to Realm in hours, and save weeks of implementation, optimization and debugging time on an average project.

"Realm's ease of use doesn't come at a performance cost. Because of its memory mapping, lazy loading and custom storage engine, Realm is usually faster than raw SQLite, despite offering a rich object-based API. Although we always recommend that everyone test their own use-cases, developers usually see huge speed-ups when porting apps to Realm."

Realm claims its solution outperforms competing offerings from IBM, Microsoft, Amazon and Google.

SourceDNA Statistics
[Click on image for larger view.] SourceDNA Statistics (source: Realm)

One feature that makes Realm stand out from similar solutions is its reactive design, similar to React.js and React Native. A Realm developer explained more about that in a comment in a Hacker News post. "A reactive database allows you to structure your code so that you 'react' to changes in your data layer -- you don't have to re-run queries to get updates, because Realm updates all your data objects to point to the newest version of your data," said a commenter with the handle "fealebenpae" who identified himself as "Yavor on the Realm team."

Although funding for the project started in 2011, Realm was announced as "the first mobile-first database" in July 2014. The project was started by two former Nokia developers who applied their experience in optimizing data storage on plastic bar phones to smartphones. "They discovered that if you applied similar storage optimization techniques to modern smartphones, you could make data fit into much less memory, making data access much faster, and forever removing the need for users to ever see a loading spinner indicator," the company said.

Since its introduction almost two years ago with only an Objective-C version for iOS and Mac development, the company said its database has reached a level of maturity allowing for the 1.0 launch of the product for iOS and Android. It recently added a version for Xamarin, the cross-platform tooling recently acquired by Microsoft, adding C# and .NET to its list of supported technologies. Before that, React Native support was added in February.

Realm the company claims Realm the database is actively used by more than 100,000 developers each month, who produce software for devices used by 1 billion people.

Features of the 1.0 version highlighted by the company include:

  • An elegant notification system that allows developers to build reactive apps easily.
  • Full support for the latest versions of Apple's Swift language.
  • Intuitive Java modeling, for even more flexible object interfaces.

Citing an active developer community, the company said, "We're the 4th-most starred database overall on GitHub, and perennial top-trending repos for Java and Cocoa."

With the source code for realm-cocoa (7,563 stars and 823 forks), realm-java (4,711 stars and 625 forks) and numerous other projects hosted on GitHub, community developers have pitched in to create add-ons such as Map View, Search List View and Grid View, along with tools such as JSONExport, RealmObjectEditor and various other extensions, datasets, connectors and more.

"Realm is built in the open on GitHub," the company said. "Features are prioritized based on user requests and we welcome contributions. We have over 12,000 stars on GitHub, and beyond the core projects, our community has already been building hundreds of apps, plug-ins and components."

About the Author

David Ramel is the editor of Visual Studio Magazine.

Featured

Upcoming Events

AppTrends

Sign up for our newsletter.

I agree to this site's Privacy Policy.