News for hackers. Stuff that matters.

ChrMelchior

Christian from Realm here. Main differentiators are probably:

- Realm is self-hosted compared to Firebase which is an MBass.

- Native objects all the way down vs. a JSON structure

Re:Realm 1.0 on Wednesday May 25, 2016 @10:57AM (#11770220)
With all respect to Kevins benchmarks. There are many ways to measure performance and most of them are wrong. If you see the talk he even admit that his numbers changed quite a bit between each benchmark run.

From what we see, we are generally faster than raw SQLite on all metrics except when doing batch inserts. This is primarily an API problem, because our low-level access is 200-300% faster than SQLite (which Kevin also mentions). It is something we are well aware of and plan to address quickly after 1.0: https://github.com/realm/realm-java/issues/1684

Our own numbers are here: http://www.slideshare.net/ChristianMelchior/realm-building-a... including a link to the code

Re:Realm 1.0 on Wednesday May 25, 2016 @10:49AM (#11770137)
No, the change notifications will work across processes as well. Realm Java still need to add multi-process support though (https://github.com/realm/realm-java/issues/1091), but it is working in Realm Swift/Objective C.
Re:Realm 1.0 on Wednesday May 25, 2016 @10:29AM (#11769993)
Yes, thinking about the internal structure as a graph will give you the right ideas.

We don't have support for collecting objects bottom up yet, bu t it is tracked here: https://github.com/realm/realm-java/issues/2232

Realm Swift/Objective C has support for bi-directional references and we are adding that to Realm Java shortly as well: https://github.com/realm/realm-java/issues/607 ..That will also help when doing bottom-up queries.

If you want to know more about the internal details. There is some talks/articles here that might interest you:

- https://realm.io/news/threading-deep-dive/

- https://realm.io/news/jp-simard-realm-core-database-engine/

- https://www.youtube.com/watch?v=vGFInG96KH4

Re:Realm 1.0 on Wednesday May 25, 2016 @10:11AM (#11769869)
Realm is not a relational database, but an Object database.

This means that we totally avoid the impedance mismatch when you try to map Java references to tables. In Realm, relationships are first-class citizens.

This is also one of the reasons that we can provide lazy-loading for everything. With ORM's the API might look the same on the surface, but you usually run into problems when trying to access foreign collections.

API wise we try to stay as close to normal Java as possible, which is probably why it looks similar to what Hibernate offers.

Regarding specific features.

- Realm uses zero-copy as much as possible, so collections in Java point directly to the underlying data (i.e takes almost no space on the Java heap).

- Collections are live updated yes.

- Deleted objects could potentially be accessed after they are deleted, but there is API methods for avoiding that.

- Cascading deletes is not supported yet, but really high on our TODO and definitely a feature we want to add.