Hacker News new | ask | show | jobs
by ckurose 3692 days ago
What's meant by a reactive database vs a non-reactive one?
1 comments

Hey, Yavor on the Realm team here. 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. Check out the sample code in your blog post: https://realm.io/news/introducing-realm-xamarin
I don't get it. The sample is re-running the Count() call. A reactive design would post an event.
The core of Realm tracks writes across different threads and processes and that's how we know to update the result objects without rebuilding the query or rebinding the model objects. There is a PR to actually expose this as a high-level notifications API and we'll roll it out in our next Realm Xamarin release: https://github.com/realm/realm-dotnet/pull/502/commits/f4169.... Using that it will be possible to implement INotifyCollectionChanged and IObservable directly on top of Realm.
Derp. your blog post should read the blog post.