Closed johnpryan closed 3 years ago
+1 Still waiting for Realm for Flutter
I think the community would help in the development there is not enough official start of development
@listepo It looks like the realm team is wanting to accelerate the process
Additionally there has been some community work done but it's not in a mature state, and I'd love to see an official implementation (and am eager to hear when it might be possible to start): https://github.com/nhachicha/realm-dart-ffi/ https://github.com/mogol/flutter_realm/
Any timeline when realm support will be available for flutter ?
Any alternatives for realm? preferably nosql databases.
Any alternatives for realm? preferably nosql databases.
Take a look on https://ejdb.org
Any alternatives for realm? preferably nosql databases.
Take a look on Hive
Any alternatives for realm? preferably nosql databases.
Take a look on https://www.couchbase.com/ https://github.com/SaltechSystems/couchbase_lite
Any updates on the timelines when Realm will be supported on Flutter?
We are still hard-blocked by the Dart team awaiting a Finalizer implementation - https://github.com/dart-lang/sdk/issues/35770
We cannot move forward without this functionality
4 years for an SDK pretty sad :(
4 years for an SDK pretty sad :(
Flutter wasn’t a viable enterprise target since the last year or so. In this case, the Realm team needs to balance current deliverables with this newfound demand for Flutter.
These are hard releases to make stable as is, but this is a feature both Mongo and Google are enabling for us. It is always more time consuming to coordinate two teams, and in this case one is blocking the other’s progress. That happens within one business all the time, imagine fixing that problem between two.
That being said I’m waiting impatiently as well.
Is it not possible to workaround gc finalizer callback somehow? By reading through their (dart) issues and their pace it seems like this feature is really not on top of their priority and probably won't be done neither until the end of this year. Suppose that is the case, until you start developing the SDK and finishing it is at least half to one more year so that is plus one and a half year from now on. On the other hand because of this you have a missing platform that has become - as you said - viable since a year and looking at your issues this is the most requested one by a huge margin.
@najibghadri Late last year dkcharkes said they are planning on having the feature in the next quarters. We're coming up on the end of that time frame, and you can see the team is active in the dart:ffi issue.
For now I think people should thumbs up the issue, and google will get to it at some point. But I think your timelines are inaccurate. According to his timeline it should be coming very soon - though as software deadlines go it may take a bit longer - but saying it could take .5-1 years is just making numbers up not based on anything they said as you suggested.
Yes we need more thumbs up on the following issue: https://github.com/dart-lang/sdk/issues/35770
Yes we need more thumbs up on the following issue: dart-lang/sdk#35770
The feature is actively being worked on. We understand pretty well the importance of it. However this feature requires very careful design which we want to get just right - that is why it is taking longer than other FFI features.
If people want to highlight their interest they should feel free to 👍 dart-lang/sdk#35770 - I would like however to discourage people from leaving "me too", "+1" and "realm database needs this" comments on the issue, as these comments don't really contribute anything to the discussion. Thank you for understanding.
Yes we need more thumbs up on the following issue: dart-lang/sdk#35770
The feature is actively being worked on. We understand pretty well the importance of it. However this feature requires very careful design which we want to get just right - that is why it is taking longer than other FFI features.
If people want to highlight their interest they should feel free to 👍 dart-lang/sdk#35770 - I would like however to discourage people from leaving "me too", "+1" and "realm database needs this" comments on the issue, as these comments don't really contribute anything to the discussion. Thank you for understanding.
No, Thank you for continuing to do what's in developers' best interest with Dart. I don't think a language of that size has ever moved to strong types and AOT. Well done!
https://github.com/dart-lang/sdk/issues/35770#issuecomment-650158676
dart:ffi supports GC finalizers now!
Any news? Also, we have ffigen and gluecodium
@drewdipalma can we see the new Roadmap?
@listepo We are very interested In Flutter and are working with the Dart team right now on how best to design an integration with the VM - stay tuned
What about Flutter for web? Doesn't it compile to javascript instead of machine code? So should the dart version of realm also have to compile into the javascript version of realm?
@vjlomocso I could be wrong here, but I don't know how well realm would work in a browser. It manages it's own database in its own file(s), and in browser you can't just "make a file", there are few options for storing data in web, including indexdb, local storage and cookies. So I don't know if they can support web. In addition, their core is in C or C++, so adding dart support works because they can just integrate with that. But in web, even if webasm can compile those languages, it's going to be trying to access system apis that won't exist in webasm (like creating files).
You probably will have to use a framework that allows use of indexdb under the covers to support web. Like hive I think.
This isn't my area of expertise so could be wrong
@csga5000 But the reason why flutter might be more attractive than other frameworks is that they even plan to include web in their supported platforms. .NET MAUI for example is very cross-platform, but use blazor for web and xaml for everything else. Flutter just uses the exact same code even for web.
Does that mean that in order to use realm, you have to commit that you are never going to support a web version with it in the future?
@vjlomocso First of all, if it's "impossible" to use realm in web, then no cross platform or native web framework will support it, so flutter could still be the best platform for web even if supporting web isn't as nice as supporting mobile due to limitations or a lack of realm.
Second it may still be possible - if something that wraps index db could substitute realm for web, and have an similar or identical api (so that your same code works). index-db doesn't exactly have observers yet tho, so there's at least one or two items that wouldn't work currently without some sort of hacky workaround. That's separate than the support we're adding here in how it would be done, because this is supporting the full realm database which may not be possible in a sandboxed browser app. It may also be possible to write a version of realm that operates only in memory for web. So realm could function as expected, except none of your data would persist a hard page refresh or tab closure (and it wouldn't span tabs either unless you can share that memory across them somehow). This may be fine for many use cases (since your page needs internet to load anyway) - and would take fairly minimal changes to your app. (it could still get it's data from realm, it could just "start" empty until it loads, and some pages you may have to load the data again you didn't have to previously if it's freshly loaded).
And lastly, just because realm isn't supported for web doesn't mean you can't make your app work for web. Since you're working with web (asside from pwa's) your website won't work without internet, so you may not need caching in the same way, so you could add a work-around so that your code doesn't cache data on web, it just uses what's in memory. You could write your code properly abstracted such that you can swap something else out for web as well. (Ex. have a data layer, and then use behavior subjects to pass events back up to the UI).
To address "you have to commit that you are never going to support a web version with it in the future?" - I can see you potentially mean with realm not necessarily your entire app. I think it would be fair to say there may be limitations that force you to make adaptations for web which is an unfortunate (and fortunate) consequence of the fact that a web browser application is different from a mobile app and runs in a very differently sandboxed environment. Realm isn't just "UI", it currently runs low level code and manages it's own data on the disk.
@vjlomocso might I suggest https://moor.simonbinder.eu/ we have moved to using that in almost all of our flutter work. We are also now looking into https://docs.hivedb.dev/#/ , but haven't used it in production yet, so can't vouch for it yet. Both of those support not only ios and android, but also web. Realm kinda dropped the ball here, so there are some great alternatives now!
Yeah I already mentioned Hive. Haven't seen moor. I think realm is a bit more involved than those projects, but I do think people are stepping in to try and fill the need.
How do these alternatives help with syncing user data across devices. Or are you using something different for that?
How do these alternatives help with syncing user data across devices. Or are you using something different for that?
Firebase is probably your only option with Flutter that has out-of-the-box syncing. Personally, I have a service with a database and use moor
table-watchers to automatically make requests to push the data up.
@de1mat FWIW, we're using AppSync through our own plugin, and we may eventually move to AWS' official Flutter solution, though no idea when DataStore will be done: https://github.com/aws-amplify/amplify-flutter
You can use Couchbase.
https://www.couchbase.com https://pub.dev/packages/couchbase_lite
There are also another library only for iOS where used latest mongodb prerelease
Not that this thread should turn into a discussion of alternatives, but I've been weighing my options as I patiently await Realm on Flutter.
It appears to me that many solutions for true offline-first performant realtime databases are waiting for some dart improvements for full implementation. Perhaps this is a reason Firestore uses the dumbed-down caching method for offline mode. I would suggest to stick with Firestore until Realm (or AWS's solution) is available, unless you actually need the additional offline-first feature set NOW that firestore doesn't provide. In that case, you either have to build your own sync solution, or use something like couchbase - which in my opinion has a steep learning curve and isn't as well suited to lower-cost simpler apps (compared to how simple Firestore is to implement, and how cheap it is to use on small stuff).
Firestore offline does work very well, but with limited offline querying abilities, and performance degrades if you start queuing up thousands of offline writes.
I've dabbled with Hive and Sembast that manually sync to the cloud - and it's a lot of extra development to build a sync solution that tests well in a wide variety of use cases.
I'm very much looking forward to Realm for some projects I have that require true offline-first implementation (better offline querying and performance for heavy offline data collection).
Hey All, Product from Realm here, we have approved a Dart/Flutter SDK preview. Stay tuned.
Woot!
@ianpward have initial repo for Real Dart/Flutter SDK
?
@ianpward when is it going to be released?
Ian knew to let us know in the thread, he’ll know to announce it here later, let’s give ‘em a break. 😂
Can't wait!!
Please, for following you don't need to comment and give everybody in this thread a notification. I prefer if everybody keeps this thread clean so people don't have to unfollow this thread when they are sick of notifications.
It is great news that the realm team is working on a Flutter implementation and let's all wait patiently.
If you want to follow this thread, just subscribe with the button:
Hello! Don't know if this is a bit off-topic, but I just found a rather recent (unofficial) mongodb realm plugin for flutter: https://pub.dev/packages/flutter_mongodb_realm
Any updates?
4 years and still no implementation? How many customers and $$$ have they lost already?!
Soon. Soon. Keep an eye on our next newsletter
Hi @ianpward why you are not working officially Realm project but say about soon newsletter? Is your project third party library?
@saeed-golshan he said he was the product manager
Ok I found him on this issue answer. I think that will introduce in MongoDB.live conference July 13–14, 2021
It happened realm-dart
It's appeared but in preview mode with some config needed and just local realm but make us happy
Just a question... Is this unofficial realm package https://pub.dev/packages/flutter_mongodb_realm worth it? And can't the official realm dart team take the help of this package in some way ?
Flutter is a new way to build cross-platform mobile apps using Dart.
It would be great to see a native implementation of Realm for Dart and Flutter. Flutter has access to the dart:io package, which should provide everything necessary to write a native library for Realm.
How much effort / public demand take to get an official client?
Thanks!