Live data from Hacker News

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

realm.io

11–20 of 105 posts

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

#12
The API approach vs. SQLite, etc. is interesting - particularly that it does not look to have very many moving parts. I'm curious about transactional semantics though. Are they 'always on' or is there API control (still haven't gone through docs completely yet, so I may answer my own question later).

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

#14
post #13

What does this provide that CoreData doesn't? Whatever it is, it needs to be clearly explained on the landing page. Otherwise it's difficult to understand what problem this solves compared to CoreData.

To me the more important part is the interface and thread safety.

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

#16
post #12

The API approach vs. SQLite, etc. is interesting - particularly that it does not look to have very many moving parts. I'm curious about transactional semantics though. Are they 'always on' or is there API control (still haven't gone through docs completely yet, so I may answer my own question later).

Alexander from Realm here, all interactions with the database is through full ACID transactions, but it is a bit untraditional in that the interaction model is build specifically to mobile apps.

The transactions interact with the runloop, so that you are always in an up-to-date read transaction (which always give you a consistent view and never blocks, even when other threads modify the same data). To write, you have to do explicit write transactions.

So your data is always live, consistent and up-to-date without you having to do any explicit coordination (apart from the write transaction on changes) and notifications allow you to always keep your UI up-to-date with the latest changes.

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

#17
post #11

Looks good. Would really like to see Swift support. Also, the example showing integration with REST services in interesting, seems like you could do more with that.

Realm currently supports Swift, though we're actively working to improve our Swift APIs[0]. You can find Swift sample code throughout our docs[1], and in our Swift examples on GitHub[2].

We learnt a lot about Swift introspection and interacting with Swift objects from the Objective-C runtime. We'll share our findings in some upcoming blog posts, so stay tuned!

[0]: https://github.com/realm/realm-cocoa/pull/549 [1]: http://realm.io/docs [2]: https://github.com/realm/realm-cocoa/tree/master/examples/sw...

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

#18
post #13

What does this provide that CoreData doesn't? Whatever it is, it needs to be clearly explained on the landing page. Otherwise it's difficult to understand what problem this solves compared to CoreData.

The big thing is really ease of use. Our blog post has a few more details on that point [0] but basically what we heard over and over and saw ourselves, is that Core Data quickly gets in your way if your app grows [1][2][3]. In essence, we tried with this initial release to offer a rich feature set with a simple API, less side-effects (especially for multi-threaded apps), and a performance that’s even better than using raw SQLite.

In early testing we got a lot of higher-level questions about what Realm was exactly, so we decided to go for a descriptive tagline instead, but you’re right that we should add more details about how we compare to Core Data!

  [0]http://realm.io/news/introducing-realm/
  [1]http://wbyoung.tumblr.com/post/27851725562/core-data-growing-pains
  [2]http://alastairs-place.net/blog/2013/04/17/why-core-data-is-a-bad-idea/
  [3]http://inessential.com/2014/06/11/core_data_thoughts_june_2014
(EDITS: formatting)

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

#19
A big plus for sqlite is that you can use it everywhere. For example, for a REST service instead of return a JSON I just return the sqlite database. Also, I can see the data in the desktop, use it on python, etc.

This could work elsewhere too? Be usable in python?

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

#20
post #19

A big plus for sqlite is that you can use it everywhere. For example, for a REST service instead of return a JSON I just return the sqlite database. Also, I can see the data in the desktop, use it on python, etc. This could work elsewhere too? Be usable in python?

You can do the same thing with Realm. We actually have a couple of key benefits over SQLite there, which are that our file size is much smaller (usually about 50%), and we don’t require deserialization to get objects out of the file (Realm data can be streamed directly into memory as native objects in your language).

On the minus side, We don’t work from everywhere yet, but we have internal bindings for Python, Ruby, C#, Java, PHP and a few other languages. We focused on the iOS launch so far, but we do plan to wrap up those additional implementations and share them on GitHub.

Post reply on HN