Realm introduced its new mobile development platform aiming to provide seamless realtime synchronization, conflict resolution, and reactive event handling. Furthermore, its client-side database is now fully open-source.
Realm Mobile Platform integrates the Realm Mobile Database with the new Realm Object Server to provide its features across multiple mobile device platforms, including iOS, Android, and watchOS.
One of the key aspects of the Realm Mobile Database is its being an object graph manager aiming to provide a direct representation of an app’s model, similarly to Apple’s Core Data. Realm Object Server extends that philosophy by providing the abstraction of live objects, which are, Realm claims, seamlessly and automatically kept in sync with objects on different devices without ever requiring the programmer to write networking code. A fundamental feature for this to be possible is automatic conflict resolution, which is required when competing changes to shared live objects are submitted at the same time. Realm’s approach to conflict resolution aims to provide strong eventual consistency, which ensures that both sides always converge to the same result even when they apply changes in a different order. This is accomplished by following a few basic rules, including:
- If an object is deleted, then it remains deleted even if another device updates it later.
- If two devices update the same property, the last change prevails.
- If two devices add an item to the end of the list, the two items are appended according to their insertion time.
Thanks to automatic conflict resolution, says Realm, developers can easily build apps that work properly despite lost or intermittent connectivity.
Another interesting feature of Realm Mobile Platform, albeit only available in its premium enterprise edition, is event handling. This makes it possible to define server-side handlers that are triggered by an object’s state change as soon as it is propagated to the server, and thus enables the design of apps implementing a serverless architecture.
Realm Object Server can be deployed on-premises or run on public cloud, including on AWS, Azure, etc. Realm is offering its Mobile Platform in two tiers: a free developer edition and a premium enterprise edition which also includes event handling.