3 ms·
What's meant by a reactive database vs a non-reactive one?
by ckurose 10y ago
What's meant by a reactive database vs a non-reactive one?
- fealebenpae 10y agoHey, 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 https://realm.io/news/introducing-realm-xamarin
- fealebenpae 10y agoDerp. your blog post should read the blog post.
- nbevans 10y agoI don't get it. The sample is re-running the Count() call. A reactive design would post an event.
- fealebenpae 10y agoThe 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/f4169276e3c197a875f2aca259c24e80700344ab 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.