// the find
realm/realm-kotlin
Kotlin Multiplatform and Android SDK for the Realm Mobile Database: Build Better Apps Faster.
Realm Kotlin is MongoDB's official Kotlin Multiplatform SDK for the Realm embedded database — object-oriented persistence for Android and iOS from shared Kotlin code, with reactive query streams via coroutines. The catch: MongoDB announced deprecation of the entire Realm SDK line in September 2024, so this is a dead-end for new projects that wanted Atlas Device Sync.
- The reactive query model is genuinely good — `asFlow()` on any query, object, or list gives you a fine-grained change stream with inserted/changed/deleted indices, not just a full re-emit
- KMP support is real, not bolted on: shared `commonMain` data models compile to native on iOS via Kotlin/Native and to bytecode on Android/JVM with a single schema definition
- The local-only path (v3.0.0+ or the `community` branch) still works and has no dependency on MongoDB Atlas — if you just want an embedded object store, the deprecation of Sync doesn't kill you
- Coroutines integration is first-class: `realm.write {}` is a suspend function, transactions are structured concurrency-aware, and the memory model requirement (new Kotlin Native MM only) is now the default so it's no longer a footgun
- The deprecation warning is the first thing in the README and it should be the first thing in your decision process — MongoDB is walking away from this; the community branch has 95 forks and unclear long-term ownership
- Gradle version ceiling (6.8.3–8.5 as of the latest release) means you'll hit compatibility friction as the Android toolchain moves forward, and there's no organization committed to keeping that matrix up to date
- The query language is NSPredicate-style string predicates (`"dog.age > $0 AND dog.name BEGINSWITH $1"`), which means no compile-time safety — typos in field names are runtime crashes, not build errors
- Cold-start Realm open time on iOS via Kotlin/Native is noticeably slower than on Android due to the AOT compilation overhead; benchmarks in the repo show this but the README doesn't surface the tradeoff