Live data from Hacker News

Realm Mobile Platform – Realtime Sync Plus Fully Open Source Database

realm.io

31–40 of 80 posts

Re: Realm Mobile Platform – Realtime Sync Plus Fully Open Source Database

#31
post #12

Earlier quoted context omitted.

There’s tons of stuff CouchDB sync doesn’t support that end up being a huge problem with mobile apps… Here are the top 3 things Realm adds in my opinion: great client-side performance, native models that are extremely easy to use, and conflict-free sync (not conflict resolution!). Thanks for listing those potential benefits. Any idea if those CouchDB issues are covered in detail somewhere?

I work on PouchDB, in terms of those points: "great client-side performance": PouchDB is more than fast enough for most use cases, its just a wrapper over indexedDB. (there are areas we can improve, particularly performance of map reduce / mango queries). "native models that are extremely easy to use": Not sure what that means, PouchDB and CouchDB use json, its native and easy to use in JavaScript "conflict-free sync…

(I also work on PouchDB.)

For "conflict-free sync," according to the docs, this appears to be last-write-wins along with a special case for deletes: https://realm.io/docs/realm-object-server/#conflict-resoluti... . (Incidentally Couch/Pouch also has a special case for deletes, but it does the opposite behavior by default – deletions lose to updates.)

There's also some language in here about how "insertions in lists are ordered by time;" I'd be curious to know how they coordinate clock times across nodes. Ditto for "last update wins" – important to know how "last" is determined.

In general, I tend to be skeptical of systems that hinge on last-write-wins, but LWW is definitely a model that works in a lot of cases where you're not too concerned about the possibility of losing data, and it's also a simpler mental model for the app developer.

Re: Realm Mobile Platform – Realtime Sync Plus Fully Open Source Database

#32

Any updates on the C++ API and lib? It's been pending since a year[1] and there are no updates :-( [1] https://github.com/realm/realm-cocoa/issues/2198

We open-sourced our core which is written in C++, though different API. This now makes it easier and we would love to build it alongside the community: https://github.com/realm/realm-core

Re: Realm Mobile Platform – Realtime Sync Plus Fully Open Source Database

#33
post #26
post #14

Earlier quoted context omitted.

Can you explain this statement: "There’s tons of stuff CouchDB sync doesn’t support that end up being a huge problem with mobile apps" You lay it out there and then talk about what Realm adds, but never what Couch lacks. And are you including PouchDB in your evaluation of CouchDB for "Client-Side Performance"? As I understand PouchDB is performant, uses JSON (pretty much the definition of "Native Models"), and allows…

I think you're misunderstanding what "Native Models" means in the context of iOS work. Saying that a database uses JSON immediately, to many ios devs, recalls years of writing very fragile json serialization code. Looking through CouchDB's iOS example apps confirms that yes, basically everything that isn't a string or int has to be serialized into JSON. That's a pretty enormous annoyance, and incorporates a lot of ad…

Ahhh, got it. When I hear "offline-first" my mind's been in webdev-mobile, not appstore-mobile. Thanks for clarifying!

Re: Realm Mobile Platform – Realtime Sync Plus Fully Open Source Database

#34
Congrats on the big release.

I remember I was using very early version of Realm in the one of the Android apps I was working on at that time. It was not working properly for me, unfortunately. Random Segmentation faults and limitations that one have to use the POJO extended from the RealmObject. So, I eventually switched back to SQLite (plus ORMLite).

I have seen a lot of changes and now I think I would definitely consider giving it a try.

One question that I have is even though it's nice to have self-hosted Realm Object Server, are there any plans or timeline that it's going to be open-sourced ?

Re: Realm Mobile Platform – Realtime Sync Plus Fully Open Source Database

#35
post #31

Earlier quoted context omitted.

I work on PouchDB, in terms of those points: "great client-side performance": PouchDB is more than fast enough for most use cases, its just a wrapper over indexedDB. (there are areas we can improve, particularly performance of map reduce / mango queries). "native models that are extremely easy to use": Not sure what that means, PouchDB and CouchDB use json, its native and easy to use in JavaScript "conflict-free sync…

(I also work on PouchDB.) For "conflict-free sync," according to the docs, this appears to be last-write-wins along with a special case for deletes: https://realm.io/docs/realm-object-server/#conflict-resoluti... . (Incidentally Couch/Pouch also has a special case for deletes, but it does the opposite behavior by default – deletions lose to updates.) There's also some language in here about how "insertions in lists a…

Realms approach to conflict resolution is very different from what you see in products like Couch. Realm is an _object_ database, so in contrast to document databases where conflict resolution happens very coarse grained at the document level, in Realm it happens at the object level (and actually all the way down into individual properties).

This essentially means that the entire object graph is treated as one big CRDT [0], transparently handling conflict across individual objects, properties and relations.

When talking about ordering by time, both in the context of LWW and insertions in lists, we are talking about vector clock time, not necessarily device time (or though that is taken into account as well).

[0] https://en.wikipedia.org/wiki/Conflict-free_replicated_data_...

Re: Realm Mobile Platform – Realtime Sync Plus Fully Open Source Database

#36
Another Core Data alternative to try is YapDatabase: https://github.com/yapstudios/YapDatabase

It is similar to Realm in a lot of ways, with a simple concurrency model, and native objects (key/value/collection). It's built on top of SQLite so you can use extensions like secondary indexes, full text search, RTree. You can also use SQLCipher for full database encryption, and there's another extension to do automatic syncing via CloudKit.

Caveats are it only runs on Apple platforms, doesn't have cross platform sync, and isn't backed by VC funding. If you need those things then Realm is definitely your best choice.

Re: Realm Mobile Platform – Realtime Sync Plus Fully Open Source Database

#37
post #34

Congrats on the big release. I remember I was using very early version of Realm in the one of the Android apps I was working on at that time. It was not working properly for me, unfortunately. Random Segmentation faults and limitations that one have to use the POJO extended from the RealmObject. So, I eventually switched back to SQLite (plus ORMLite). I have seen a lot of changes and now I think I would definitely co…

Paul from Realm here: The Developer Edition of Realm Object Server is free forever, and we're committed to adding new features and making it more powerful over time, but at the moment we haven't made any decisions about making it open source. We do have a strong history of open sourcing the things we build, so it's definitely something we're thinking about.

Re: Realm Mobile Platform – Realtime Sync Plus Fully Open Source Database

#38

Any updates on the C++ API and lib? It's been pending since a year[1] and there are no updates :-( [1] https://github.com/realm/realm-cocoa/issues/2198

We open-sourced our core which is written in C++, though different API. This now makes it easier and we would love to build it alongside the community: https://github.com/realm/realm-core

Kudos!

This is great news for us Mobile C++ developers who don't have alternative to SQLite.

You just made my day :-)

Re: Realm Mobile Platform – Realtime Sync Plus Fully Open Source Database

#39

Any updates on the C++ API and lib? It's been pending since a year[1] and there are no updates :-( [1] https://github.com/realm/realm-cocoa/issues/2198

We open-sourced our core which is written in C++, though different API. This now makes it easier and we would love to build it alongside the community: https://github.com/realm/realm-core

[deleted]

Re: Realm Mobile Platform – Realtime Sync Plus Fully Open Source Database

#40

Former Realm employee here. So glad to see the team finally launch this. I've seen them work their asses for years (literally!) to launch something I know Realm’s 100k+ dev community was clamoring for from day one but was really hard to build. I'm biased of course but honestly I think they have soft-key shipped one of the most transformational mobile technologies ever: real-time, conflict-free sync that works as well…

CouchDB and iCloud already have this.
Post reply on HN