-
Notifications
You must be signed in to change notification settings - Fork 165
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
Web Assembly/WebGL Support #2199
Comments
We don't support Wasm yet, although this is an area of acute interest. The Core Database team is exploring various approaches to get the native bits running in Wasm, but that effort is in its infancy and we're not in a position to make any commitments as to when and if the .NET SDK will be able tor un in Blazor/Uno. |
Any news on this one? |
Unfortunately, nothing to report here. |
I believe that flutter has a wasm head so if we don't have wasm compilation on realm core, does it mean that we also can't use it for flutter web? |
That is correct - none of the Realm database SDKs support web. If you're using MongoDB Realm (i.e. Sync), you can use the GraphQL API via http to query data in Atlas, but you can't use the local database. |
I'm late to the party, as always: Unity WebGL support is a super important feature for us, really (and a bit of a dealbreaker if not coming in the near future). Unity's WebGL/WASM build quality and power has been pretty underrated for quite some time, and it's mostly held back by proper support of a good "C#-speaking" database for Web and Mobile and Desktop. Use case: We're designing a Web3 & Mobile game we plan to scale to ~60-70k concurrent users, and are looking for ways to not have to deal with writing and maintaining a bridge from Firebase Web to Unity for WebGL/WASM builds (while we could use the pretty decent mobile SDKs otherwise). Realm has a vastly superior, very clean development paradigm in-engine that made it a very sweet outlook; to be honest I've never seen a more compelling C# data persistence, exchange and sync solution. Realm also has native desktop support, which is a huge plus. In-Browser execution is still a must for our use case at this time. There's perhaps a way to feed the native Cpp code into whatever compiles Cpp to WASM in Unity. Even though Unity Technologies just started their half-baked own backend-as-a-service, I reckon they'd be super keen on a solution as slick as Realm Sync to support their entire product. It wouldn't hurt to ask. Metaverse & stuff is really big on Unity this year. |
.NET 7 is not too far of, and WASM is going to be important in that release. |
NB that for Unity3D, which isn't even on .NET 6 for the foreseeable future, WASM support is a somewhat different issue altogether. |
Hi, any updates on that? We're evaluating the use of Realm for Blazor on multiple enterprise apps, is this on the roadmap? |
It's not something we expect to support in the near/mid-term timeframe. We have done some preliminary work to support WASM using the JS SDK, but that's mostly at the POC stage. |
Just another comment on how much I would love to see realm in Web Assembly. We have multiple projects using realm, and the only option to access realm DB from the web app is through querying the MongoDB database either through Graph QL APIs, or through a custom API layer. |
@kyurkchyan are you looking for database support in WASM or just an API to do one-off queries of MongoDB using C#? We're considering extracting the authentication, functions, and remote mongodb client functionalities from the SDK into a separate package, that will be WASM-compatible, but I'd be curious to hear if that's something that will solve your use case. |
Hey @nirinchev. We are looking for DB support in WASM/Blazor. I asked this question about three years ago in StackOverflow, and you had a reply to it. I have been closely following this topic since then regularly. In most apps we develop, we would like to have as much as possible feature parity and code sharing between mobile and web. Otherwise, we must completely duplicate the core business logic for synced and non-synced scenarios. When working in a sync realm scenario, we heavily rely on the reactive aspects of the realm, and the app is built with reactive extensions. Thus, if the web app can't do that, we will need to reimplement the web app with a more traditional server/client API-based approach, which translates into a different business logic, and in many cases, a different UX. For instance, in WEB API-based approach you need to start thinking about data pagination, which is not an issue in a synced realm scenario. Thus, we should have synced DB in WASM in the ideal world scenario. Before reaching that ideal world, having shared remote and auth functionality is still a significant gain, as it will simplify the setup. We could go without an explicit API server and talk to MongoDB directly through the auth/API layer built into the realm SDK. |
Thanks, this makes sense! We're still slowly working towards database support for WASM, but there are many non-trivial obstacles, so we still have some way to go before it's feasible to use as a fully supported platform. Extracting a fully managed implementation of a App Services client is more feasible in the short term and we'll take your feedback into consideration when reviewing the backlog of tasks. |
I'd be interested to know if this idea has got much further. We're writing mobile app with Realm but because of app store rules, we have to manage subscriptions outside of the Apps. We would like to do this through a small Blazor WASM project. Authentication would be good, as would writing to custom user data. |
Yes, that's still something we're interested in and are slowly moving in that direction, but don't have a timeline we can share yet. If you have timeframes for when you'd need this, definitely reach out to your account executive and share those with them as their input has meaningful impact on the engineering prioritization. |
Hi @nirinchev, thank you for the reply. I'm not sure we have an account executive as such. We've been working on a free database for several months looking at how best to structure Realm/MongoDB for our needs. |
Hi.
Does this client library work on Dotnet Web Assembly projects (Such as Uno or Blazor)?
If not, will there be a plan to add the support?
The text was updated successfully, but these errors were encountered: