Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] [WIP] Support Realm.io as storage provider #287

Closed
wants to merge 1 commit into from
Closed

Conversation

flagbug
Copy link
Member

@flagbug flagbug commented May 18, 2016

This PR adds realm.io as alternative to the SQLite storage provider.

This is an extremely rough implementation and currently doesn't even compile, because Realm doesn't support storing byte[] arrays yet.

I just wanted to get this PR so people can comment on it and see the progress.

//cc @paulcbetts @shiftkey @ghuntley @AndyDentFree who might be interested in this maybe?

@AndyDentFree
Copy link

Consider us extremely motivated by this PR and we're bumping the priority of adding the byte[] support.

@shiftkey
Copy link
Contributor

Seems really interesting, especially on the mobile side of things.

@paulcbetts and I talked about benchmarking Akavache ages ago (I forget the specific context, there's probably a PR or two lying around), but I'd love to see how Realm stacks up against what sqlite is doing currently...

@flagbug
Copy link
Member Author

flagbug commented May 18, 2016

@AndyDentFree 😍 😍 😍

I'm not extremely familiar with the Realm internals, but for SQLite we're using an OperationQueue to serialize and batch the requests to SQLite, for performance reasons. Does Realm exhibit similar characteristics, or can we just throw stuff at it™ and it figures out what to do?

@shiftkey Yeah, this is something I definitely want to do! A performance test suite would also be great to have for things like #285

@bmunkholm
Copy link

bmunkholm commented May 18, 2016

@flagbug Realm is 100% ACID. So when you do a commit() it is fully synchronous. It will fsync to disk twice to provide full serializable and crash safe writes. Only when the data has been written to disk safely will the commit return. Realm is really mostly optimized for queries as there are very physical limits to how much writes can be improved anyway.
The core does however have an alternative async mode where writes are basically handled in a queue and commit() will return before data is fully synced to disk, but otherwise it will write to disk as fast as possible. This mode is however not enabled yet in any of the products.

@anaisbetts
Copy link
Member

Very cool @flagbug

@flagbug
Copy link
Member Author

flagbug commented May 24, 2016

@AndyDentFree Do you, by any chance, have a rough estimate when the byte[] support will ship?

@AndyDentFree
Copy link

There will probably be a NuGet release some time next week. We will have it updated on our master on github well before then and I'll let you know if anyone here wants to grab from source.

@flagbug
Copy link
Member Author

flagbug commented May 24, 2016

@AndyDentFree Awesome, thanks!

@flagbug flagbug mentioned this pull request May 24, 2016
7 tasks
@flagbug
Copy link
Member Author

flagbug commented May 25, 2016

Rebasing this onto akavache5-master

@shiftkey Pls implement PR branch switching thx 😿

@flagbug flagbug closed this May 25, 2016
@glennawatson glennawatson deleted the realmio branch December 27, 2018 01:36
@lock lock bot locked and limited conversation to collaborators Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants