MongoDB extends into a new mobile Realm

MongoDB’s latest foray is acquiring Realm, a popular alternative to SQLite, for sealing the deal with mobile app developers.

realm-logo.png

MongoDB announced earlier today the acquisition of Realm, a lightweight database optimized for embedded for mobile device deployments. Realm, which was initially developed in the 2010 – 2014 timeframe and commercialized in 2017, is an object-based embedded database often positioned as an alternative to the 20-year old SQLite.

The rationale for MongoDB making the acquisition is that, while it has been often used as the back end for mobile applications, it did not have a compact version suited for embedding on the device. Realm has become a popular platform with more than 100,000 developers actively using it.

Realm is a compact engine with the kernel written in C++ for performance with APIs enabling developers to create the logic in the language of choice. The database is encapsulated in a compact container, called a Realm. The Realm can be described by what it is not. It is not a table in the relational sense because the data objects within it are not uniformly typed. Likewise, it is not a document or key-value store because within each object, there is a defined schema.

The data is maintained as "live objects" that can be updated through change feeds, and memory-mapped, so it goes directly from code to storage, and when synchronizing with the back end server, there is no replication of data. Instead, the server pushes updates like a change-data-capture feed. On the back end is the event handler, business logic, and connectors to enterprise systems. There are pre-built connectors to PostgreSQL and SQL Server; Node.js and C# server SDKs; and GraphQL API (instead of REST).

As noted, Realm is often compared to SQLite. Benchmarks, which we take with grains of salt, show up to 10x speed advantage. Because Realm is object, not SQL-based, it is simpler to lay out tables as there are no foreign keys to deal with. But as a simpler, object-based database, there are some limitations where it comes to more complex functions such as auto-incrementing data; naming of classes and fields (there are strict character limits); and lack of support for handing Realm data objects across different threads.

MongoDB will disclose plans for Realm at its annual user conference set for June. There are certainly structural differences between the two. Nonetheless, at minimum we will expect that the roadmap will include optimized connectors to the MongoDB mother ship, and extension of the IDE  for writing applications integrated to a MongoDB back end.