Rule Your Realm
summary
Blue Apron uses Realm as a fast, object‑based mobile DB because it’s simple to set up, has a reactive live query model and a handy Realm Browser, but it trips on two concrete problems: partial updates (Realm can’t tell missing keys from explicit nulls) so Blue Apron converts server JSON → network models → client JSON and uses Realm.createOrUpdateFromJson to preserve fields; and no cascading deletes so a scheduled mark‑and‑sweep reaper (retain boolean, JobScheduler, generated mark functions) removes orphaned objects. Watch for threading (one Realm per thread, use query+change listeners), native core size (~5 MB) and careful string‑based, tested migrations.
AI-written summary · about
chapters (10)
- 0:00Introduction and background
- 3:58What is Realm and setup
- 8:08Advantages of Realm
- 10:13Partial updates problem
- 13:21Orphan objects issue
- 17:51Code generation for reaper
- 20:59Native code downsides
- 24:12Schema migrations challenges
- 27:21Threading limitations
- 31:12Summary and Q&A
related talks
41mForget SQLite and say hello to Realm
42mAdvanced techniques for concurrency & memory management (en)
39mRefactoring Plaid App – A reactive MVP approach
31mRoom: An SQLite Object Mapping Library
37mAvoid the mess! Clean up your data repository
36mHot Off the Open-Source Grill: RIBs, Scalable Multiplatform App Architecture
24mFunctional Android
40mClean, Easy & Stable Android Architecture
