Live data from Hacker News

Show HN: Realm (YC S11), a mobile database

realm.io

91–100 of 105 posts

Re: Show HN: Realm (YC S11), a mobile database

#91
post #7

Earlier quoted context omitted.

Data syncing is an obvious need and Realm has actually been designed for that from day one. The entire underlying core is build to seamlessly record changes and coordinate them with a backend. It is not part of the initial launch as we want to nail down the local api's with the community first, but look out for announcements soon.

What kind of consistency do you expect to provide with this future syncing feature? I assume it will be eventually consistent. Is that right? How will conflicts be resolved?

Yes, on mobile sync really only make sense if also works when the device has spotty or no connectivity, so that naturally entails eventual consistency in some form.

We are not ready to into details about how our sync solution will work yet, but watch out for some announcements soon.

Re: Show HN: Realm (YC S11), a mobile database

#92
Sounds interesting. I'll definitely watch for the Android version :)

That said, the "insert" benchmark source for SQLite is a bit disingenuous. It makes a new compiled statement every time it inserts - if you're doing 150,000 inserts, you should definitely be reusing that thing. And on Android, greenDAO (probably others) does this automatically for every insert/update. It's not some edge-casey optimization trick, it's normal SQLite use.

Re: Show HN: Realm (YC S11), a mobile database

#93
post #73

Earlier quoted context omitted.

Seriously love this product. What the Realm guys are missing is the fact that Couchbase Lite is really a replication protocol overlayed SQLite. Couchbase Lite did not always use SQLite and is in the process of switching to ForestDB as the underlying persistent store. As far as API's go, I have not seen a more intuitive design than CBL's. It almost makes too much sense. Once you get Sync Gateway setup, you have a mini…

There is another produce coming out from Cloudant very similar, but with even more friendly api IMHO https://cloudant.com/product/cloudant-features/sync/

I think that's because Cloudant's solution is the same replication protocol (CouchDB) talking to it's hosted databases. Thank's for pointing this out, I didn't know about.

Re: Show HN: Realm (YC S11), a mobile database

#94
In my experience object persistence rarely needs SQL or other "relational additional stuff" underneath. Typically I need to store objects and their mutual relations persisted as if they were just kept in memory. Have often thought about how weird it was that you could not just persist objects "as they are" without additional mappings etc. I saw a demo of Realm and had a talk with one the developers a couple of weeks ago. As the demo and our talk progressed I found myself nodding more and more excited. As I understand Realm it seems to be based on a very natural and straightforward principle. It can't NOT be efficient... I can't wait to try this out in a real project!

Re: Show HN: Realm (YC S11), a mobile database

#95

I would love to share the swift-specific portion of the getting started docs on www.sososwift.com but http://realm.io/docs/ios/0.80.0/#swift doesn't navigate directly to that. If there's a link to Swift instructions for realm, I'll post them and you will find them here http://www.sososwift.com/?a=realm.io Good luck, looks cool!

CloudFront is giving us a lot of issues at the moment, but I implemented + deployed that feature for you! Hopefully it will be live very soon. (btw, thanks for creating & running SoSoSwift!)

Hey great, it worked! Sorry for the delay, I had to work at my actual job. :/ BTW, we just deployed a new app last week, had a bunch of problems with CloudFront. Good luck!

Re: Show HN: Realm (YC S11), a mobile database

#96
post #92

Sounds interesting. I'll definitely watch for the Android version :) That said, the "insert" benchmark source for SQLite is a bit disingenuous. It makes a new compiled statement every time it inserts - if you're doing 150,000 inserts, you should definitely be reusing that thing. And on Android, greenDAO (probably others) does this automatically for every insert/update. It's not some edge-casey optimization trick, it'…

Thanks for the feedback, benchmarks are notoriously difficult to get accurate (and fair), which is exactly why we published the benchmark code. We will incorporate your feedback to improve them.

Re: Show HN: Realm (YC S11), a mobile database

#97
post #92

Sounds interesting. I'll definitely watch for the Android version :) That said, the "insert" benchmark source for SQLite is a bit disingenuous. It makes a new compiled statement every time it inserts - if you're doing 150,000 inserts, you should definitely be reusing that thing. And on Android, greenDAO (probably others) does this automatically for every insert/update. It's not some edge-casey optimization trick, it'…

Thanks for the feedback, benchmarks are notoriously difficult to get accurate (and fair), which is exactly why we published the benchmark code. We will incorporate your feedback to improve them.

Great! I don't know enough iOS-SQLite to confidently tweak it myself, and my small experiment (in an emulator, so ginormous caveats apply) gave mostly-unbelievable results so I somewhat doubt I did it right.

I'll definitely watch with interest! I'd love a safe, faster, easier data store than SQLite. I'm certain such a thing is possible, and it would address a massive range of uses. Good luck though - SQLite is pretty fantastic, it's a tough competitor to have :)

Re: Show HN: Realm (YC S11), a mobile database

#98
post #86

I have to give it a try, but how well does it work with different BaaS providers like Parse, Kinvey, Appacitive etc?

Right now there is no specific integration into any BaaS. A Realm database is just a (compact) file that you can send as you see fit. As most BaaS solutions has their own local storage and API it may not always make sense to integrate, except that you could easily store a small Realm file as a blob in any BaaS and transfer it remotely. It will also really soon be possible to export some or all objects as json which y…

Not all of them generally have their own local storage. But as you do with the foursquare APIs, it can definitely be done with other API providers. But thanks.

Re: Show HN: Realm (YC S11), a mobile database

#99
post #92

Sounds interesting. I'll definitely watch for the Android version :) That said, the "insert" benchmark source for SQLite is a bit disingenuous. It makes a new compiled statement every time it inserts - if you're doing 150,000 inserts, you should definitely be reusing that thing. And on Android, greenDAO (probably others) does this automatically for every insert/update. It's not some edge-casey optimization trick, it'…

Thanks for the feedback, benchmarks are notoriously difficult to get accurate (and fair), which is exactly why we published the benchmark code. We will incorporate your feedback to improve them.

Should I submit an Issue on github to help push this, or is it relatively certain that it'll get done? If I get time + a device provisioning profile, I could also try to do it myself, but that's not likely to be any time soon :)

Re: Show HN: Realm (YC S11), a mobile database

#100
post #92

Sounds interesting. I'll definitely watch for the Android version :) That said, the "insert" benchmark source for SQLite is a bit disingenuous. It makes a new compiled statement every time it inserts - if you're doing 150,000 inserts, you should definitely be reusing that thing. And on Android, greenDAO (probably others) does this automatically for every insert/update. It's not some edge-casey optimization trick, it'…

Thanks for the feedback, benchmarks are notoriously difficult to get accurate (and fair), which is exactly why we published the benchmark code. We will incorporate your feedback to improve them.

I'm a little late to the party, but I ran the benchmark inserts with cached statements on both my Macbook Pro and my iPhone 5S. sqlite definitely fairs better under this scenario.

That being said I still find the speed of Realm pretty impressive. And it's hard to gauge real world performance from this test. In my experience the real bottle necks around insert are upsets and establishing maintaining relationships.

For reference here are the benchmarks without reusing sqlite statements.

  Macbook Pro - Realm: 0.780414 sqlite: 0.464804 FMDB: 0.654659 
  iPhone 5S   - Realm: 2.235381 sqlite: 2.786381 FMDB: 3.336679
And with statement reuse

  Macbook Pro - Realm: 0.766406 sqlite: 0.189747 FMDB: 0.683823 
  iPhone 5S   - Realm: 2.214847 sqlite: 0.991864 FMDB: 2.832800
Interesting side note: FMDB seems to be spending just as much time finding the cached statement as sqlite takes to prepare a new one. I didn't expect that. I haven't dug into it at all, but I wouldn't be surprised if this due to the fact that the insert statement is relatively simple.

EDIT: Just fixed up formatting for the results

Post reply on HN