Realm is great. I have been using it for four years in a large long term project. A hidden disadvantage is that it some times it is not 100% compatible with new gradle versions. It is like Realm is one step behind official google products (Like Room). In my case, that blocked the project upgrade until there was a new realm-gradle compatible version. Even that, thank you Philipp, great content like always!
Performance and boilerplate had me. Here are a few Q's: 1. Is there a realm db/schema version number that needs to be applied? 2. On app updates, is there the possibility to migrate old db versions? 3. Did you find any documentation regarding db backups (export/import)? Thanks for the extended implementation details.
I am French, I recently completed studies as an Android developer, and I wanted to thank you for your work, because it helps me enormously on a daily basis. And clearly, I am far from being the only one. Many thanks to you for sharing your knowledge ♥
Great video, also let me give you a brownfield scenario, android uses realm-java, iOS realm-swift, and you want to extract the data layer into KMP using realm-kotlin.. We did a POC and the result is choosing SQLdelight, also benchmark testing was done and SQLdelight handles transactions better.
We use realm in our project for several years now and we slowly migrate to room becouse of production issues with migrations on specific users environments (realm sometimes just crashes), with room (that we use in other projects) we do not have such issues.
Should the models (students, address, ...) be created in the data layer? Should you also create extra classes in the domain layer and then map the realmdb objects? Or should you use the same classes across the different layers?
@PhilippLackner I have the same question as above. Does it make sense to create a repository in the domain layer and map the realmdb classes from the data layer or does that defeat the purpose of Realm's 'zero-copy' mechanism?
@@raymondmichael4987 Of course, this is my opinion; it's a comment section. But this opinion is based on several years of experience at Openium (France). It doesn't come out of nowhere.
@@chazbertino6102 It's heavy, it adds a lot of weight to the APK. That's not possible today. We had a lot of issues with Room migrations back then, and before they added Frozen objects, it was hell...
I'm using for a side project too, but the thing with room is that we manually have to set relationship with objects to reference ids. This is a downsizing for me@@skyles146
Ugh, these queries are not type safe.... I don't know if/how Realm supports fields ("columns") names updates, but if it does, queries could easily get screwed during that process, unless there is some tooling for that, or unless Realm offers also type safe API for querying.
Hello! I'm creating my own application and trying to figure out how to properly migrate my application to Realm and Device Sync. I was faced with a difficult question for myself and did not find a clear answer in the documentation that would suit my needs. My question: how to stop synchronizing user data with Atlas for an indefinite period of time? For example, the user may log out or his paid period may expire. Or it may not start yet, but user will start working with the application locally to begin with. The documentation says that manually stopping synchronization for a long time is not worth it. How can I then solve this whole matter? Every time a user logs in and logs out, should I copy his data from one database to another? This seems like a bad idea. It could be GBs of data!
How would handle a background sync that pull data from a backend and tries to save it into realm, currently we are having a tonne of issues of type "Realm already in a write transaction" since the user might be also trying to save something into the DB.
Philipp, can you analyze android situation taking into account. Mobile, weareables, machine learning on mobiles and IoT ? IoT is a thing for Android ? or it was left to python
Thanks for your hard work. Could you please answer the following: The library does not support pagination. How much will everything freeze if there are a lot of elements? And how can this moment be corrected?
Which is more flexible and extensive? Realm or SQLDelight? Also there is now an ongoing effort to migrate Room for KMP support, would like to know what is the advantages of Realm if that happens.
Please make a video on RTL config and mirroring. Facing some issue with arabic when using emoji & numeric with arabic words it going in reverse direction.
@@ChrisAthanas problem is that when is write something in arabic and use some emoji at the end of para but we found those emoji appears before the text when we send messages(Starting point of para). It seems that is RTL config issue.
Realm seems like the way to go if you need "joining" which, like you said, is painful in Room. Even for simple database cases, it seems like Realm is easler. One thing that appears missing is the Database Inspector which is extremely handy for Room. Is there a replacement tool for Ream?
Great tutorial! Do you know how to observe the RealmDB during the debug process? I used to use Facebook Flipper but it works only with Realm Java SDK, not Kotlin.
@FreedivingTrainer - similar experience here. Native crashes, incorrect data, threading issues. Migrating a big old java app to kotlin with modern architecture.. it's basically a complete rewrite, but so worth it in the long run.
was looking for that. hidden magic that core was not open source. go away with it. It is a havy dependency, if you dont make clear boundaries. You will have it forever
could I ask you why it best for chat. i still never implement paging or offline-first sync but im doing a pet chat project so i want to offer offline-first sync
I have been using realm for almost 5 years its simple but dont you think room is better than realm as it is supported by google and part of architecture components Master Please need explanation
I love that you show your crashes as well as your successes. It is the real life. Realm sound promising: No more TypeConverters needed as is the case in Room, which again need a json-parser ... all in all a lot of extra code to maintain. Or less in Realm, I mean. My main issue with Room is however, that the migration logic is to complex. They promise that auto-migrations work, except in such and such case, than you must do something completely different. How does Realm deal with changes in the model? I see below that @revs87 asks about the same?
Does anyone know how to solve the problem of adding a new element to a list (RealmList) inside a transaction ( realm.write {} )? Or can we insert a new element into a RealmList only by first obtaining an object from the db, making a copy (so that it becomes unmanageable), adding an element to the list and then saving?
Realm is great. I have been using it for four years in a large long term project. A hidden disadvantage is that it some times it is not 100% compatible with new gradle versions. It is like Realm is one step behind official google products (Like Room). In my case, that blocked the project upgrade until there was a new realm-gradle compatible version. Even that, thank you Philipp, great content like always!
u lack in teaching say point by points mini projects try not to directly create a course app
Performance and boilerplate had me.
Here are a few Q's:
1. Is there a realm db/schema version number that needs to be applied?
2. On app updates, is there the possibility to migrate old db versions?
3. Did you find any documentation regarding db backups (export/import)?
Thanks for the extended implementation details.
I am French, I recently completed studies as an Android developer, and I wanted to thank you for your work, because it helps me enormously on a daily basis. And clearly, I am far from being the only one. Many thanks to you for sharing your knowledge ♥
Great video, also let me give you a brownfield scenario, android uses realm-java, iOS realm-swift, and you want to extract the data layer into KMP using realm-kotlin.. We did a POC and the result is choosing SQLdelight, also benchmark testing was done and SQLdelight handles transactions better.
Thanks for sharing!
How convenient is it to conduct migrations in SQLdelight?
@@MonichGPT It's pretty simple and well documented. It's just a folder containing your migrations with versions, and of course, it's all normal SQL.
I haven't used Realm before but im gonna start using this. It looks amazing!
What about "var" instead of "val" and no data class support? Doesn't that seem bad?
Hi Philip absolutely love your videos! Do you have in your mind that you localize price for your courses?
we are using using realm since 2018. realm has also some limitations.
It does, like everything 😄
I expeted to see The limitations here. 😵💫😵💫
I expeted to see The limitations here. 😵💫😵💫😊
Would up like to share your experiences?
You don't have easy way to see the whole encrypted DB in Android studio, I miss db viewer in Android studio with room.
Last time I used it it added quite a few MBs to final apk size, which is a no go for lots of apps
That's good to know, thanks for adding
I enjoy your content so much every time.
You are an angel, thank you!!
Hii, Can u please make a video on MEDIA3 AUDIO PLAYERS and their implementation??
We use realm in our project for several years now and we slowly migrate to room becouse of production issues with migrations on specific users environments (realm sometimes just crashes), with room (that we use in other projects) we do not have such issues.
Should the models (students, address, ...) be created in the data layer?
Should you also create extra classes in the domain layer and then map the realmdb objects? Or should you use the same classes across the different layers?
@PhilippLackner
I have the same question as above. Does it make sense to create a repository in the domain layer and map the realmdb classes from the data layer or does that defeat the purpose of Realm's 'zero-copy' mechanism?
Realm is fine but there are many limitations. We moved from Realm to Room 2-3 years ago and there is NO WORLD where we would use Realm again. None.
What were these limitations?
That's your opinion. I love Mongdb Realm it's awesome 😊
@@raymondmichael4987 Of course, this is my opinion; it's a comment section. But this opinion is based on several years of experience at Openium (France). It doesn't come out of nowhere.
@@chazbertino6102 It's heavy, it adds a lot of weight to the APK. That's not possible today.
We had a lot of issues with Room migrations back then, and before they added Frozen objects, it was hell...
i literally just decided to make room database project 3hours ago, and then i see this video LMAO u ruined my evening ahahaha
No, I think you did the right choice.
I'm using for a side project too, but the thing with room is that we manually have to set relationship with objects to reference ids. This is a downsizing for me@@skyles146
Ugh, these queries are not type safe.... I don't know if/how Realm supports fields ("columns") names updates, but if it does, queries could easily get screwed during that process, unless there is some tooling for that, or unless Realm offers also type safe API for querying.
Reality liked it. I am going to ditch adding room in favour of this. In my current project.
Hello!
I'm creating my own application and trying to figure out how to properly migrate my application to Realm and Device Sync.
I was faced with a difficult question for myself and did not find a clear answer in the documentation that would suit my needs.
My question: how to stop synchronizing user data with Atlas for an indefinite period of time? For example, the user may log out or his paid period may expire. Or it may not start yet, but user will start working with the application locally to begin with.
The documentation says that manually stopping synchronization for a long time is not worth it. How can I then solve this whole matter? Every time a user logs in and logs out, should I copy his data from one database to another? This seems like a bad idea. It could be GBs of data!
How would handle a background sync that pull data from a backend and tries to save it into realm, currently we are having a tonne of issues of type "Realm already in a write transaction" since the user might be also trying to save something into the DB.
Really good video, however I am having trouble setting up the realm dependencies with the new versions catalogue
Philipp, can you analyze android situation taking into account. Mobile, weareables, machine learning on mobiles and IoT ?
IoT is a thing for Android ? or it was left to python
Thanks for your hard work. Could you please answer the following: The library does not support pagination. How much will everything freeze if there are a lot of elements? And how can this moment be corrected?
Please keep doing what you are doing.
Thank you. Great work as always!
Which is more flexible and extensive? Realm or SQLDelight? Also there is now an ongoing effort to migrate Room for KMP support, would like to know what is the advantages of Realm if that happens.
Please make a video on RTL config and mirroring. Facing some issue with arabic when using emoji & numeric with arabic words it going in reverse direction.
Thats unlikely, but please let us know the problems you are seeing
@@ChrisAthanas problem is that when is write something in arabic and use some emoji at the end of para but we found those emoji appears before the text when we send messages(Starting point of para). It seems that is RTL config issue.
Realm seems like the way to go if you need "joining" which, like you said, is painful in Room. Even for simple database cases, it seems like Realm is easler. One thing that appears missing is the Database Inspector which is extremely handy for Room. Is there a replacement tool for Ream?
Realm studio. But not as handy as DB inspector.
Will Realm works well or any concerns with large data like ~100k records and switching thread to show loading please?
You will need to test that yourself and let us know what you come up with!
We are using in production for 2 year in desktop software, I love it, but don't think its perfect theres some pain point. Overall it's excellent
Great tutorial! Do you know how to observe the RealmDB during the debug process? I used to use Facebook Flipper but it works only with Realm Java SDK, not Kotlin.
If you're familiar with Jetpack - then RoomDB is the best option.
only if your name is haramid
@@pattmehta5835 what?
😂 started with realm in 2018. It was a huge mistake!
Still working on removing it from my app!
How comes?😄
@FreedivingTrainer - similar experience here. Native crashes, incorrect data, threading issues. Migrating a big old java app to kotlin with modern architecture.. it's basically a complete rewrite, but so worth it in the long run.
Things may have been updated since then? That was 6 years ago…
@@ChrisAthanas I have updated version from time to time of cause. And some times got new crashes after updating 😂
was looking for that. hidden magic that core was not open source. go away with it. It is a havy dependency, if you dont make clear boundaries. You will have it forever
I am using realm db and it's connected to mongo db also. Can someone help to know how to update fields in the table which reflect at mongo db also
Realm doesn't support paging : but best for chat application
could I ask you why it best for chat. i still never implement paging or offline-first sync but im doing a pet chat project so i want to offer offline-first sync
Should't it be more of Realm vs Sqlite than Room?
Thank you so much, you help us a lot.
Your tutorial is good, but I feel like Realm has significantly more boilerplate than Room, unless you're writing very complex joins.
Thanks dude 😎
Atlas version is better? try realm sync?
I have been using realm for almost 5 years its simple but dont you think room is better than realm as it is supported by google and part of architecture components
Master Please need explanation
Why that clickbait in thumbnail 🧐😠 I just don't get it. What does it mean?
One thing to think, how to avoid nullable properties?
Used both, i didn't like realm as your apk will always be bigger size than room
is Real a realtime database? Can I do auth systems with it?
not Real, Realm*
You know you can edit your comments, right?
I love that you show your crashes as well as your successes. It is the real life.
Realm sound promising: No more TypeConverters needed as is the case in Room, which again need a json-parser ... all in all a lot of extra code to maintain. Or less in Realm, I mean.
My main issue with Room is however, that the migration logic is to complex. They promise that auto-migrations work, except in such and such case, than you must do something completely different. How does Realm deal with changes in the model?
I see below that @revs87 asks about the same?
It was interesting 👨💻
Is Realm suggested by Google?
great tutorial
10:00
SQLDelight is the way. Not Realm. It's very kotlin idiomatic and kotlin multiplatform supporting as well. They simply get it
What lies ahead? Exclusive interview with Binance's CEO offers insights into future developments
The last time I use realm, I was still a virgin
Used RealmDb in react native and never want to use that again, realmdb is super useless 💀 update is slow, listen data changed is super bad
Does anyone know how to solve the problem of adding a new element to a list (RealmList) inside a transaction ( realm.write {} )? Or can we insert a new element into a RealmList only by first obtaining an object from the db, making a copy (so that it becomes unmanageable), adding an element to the list and then saving?