Knowing that Kotlin/Wasm currently is in Alpha. Wh...
# webassembly
v
Knowing that Kotlin/Wasm currently is in Alpha. What are the risks of actually using it in production on a live app with potentially millions of users?
a
The stability level Alpha means only two things: • The migration to the newer version could be more complex, because there is a place for backward-incompatible changes • The product is not in the final shape, and the implementation could be completely changed (the cause of item number one) However, quite soon (as we announce here), Wasm will move to the Beta stage, which means it will be much stable, and the migration is intended to be smoother.
🙌 1
v
So, it would just mainly be a risk of how difficult would it be to make the appropriate migrations if at all any when it moves to at least Beta? OR, for point 2 - something drastically changes in which case we'd need a fallback plan ("Sorry, not supported anymore" page or something on our end).
s
I use Kotlin/WASM since a year in production - for a pet project. So far I got lucky that there wasn't a lot of migrations to make. Just tiny ones so far. https://stefan-oltmann.de/oni-seed-browser/ has 1000+ active users per day according to analytics. 🙂
The user count doesn't matter anyway - if one user or millions. Kotlin/WASM is just a static app in your browser - similar to an Desktop app. Behind the scenes I have a Ktor server - you'll have something similar, too. Or AWS lambdas. And that's the thing that needs to scale - not the frontend.
r
User count doesn't matter as much as your intended audience and support levels for different browsers and form factors. Mainly: • accessibility can be a problem for your use-case (for example, I have not managed to get any kind of password autofill to work - this can mean a lot) • there are still users with incompatible browsers, mainly Safari (but I think the number is dwindling fast, so it may not be a problem at all for you). But what if you have an important customer, someone you wanna demo to, who can't run the app due to an older browser? And you tell them please update, but then they ask you "wait are you saying your website won't even run on a slightly out-of-date browser"? Remember: the user doesn't care about technology used, they just want it to work. • it appears to only run at 60hz • on mobile, there are still issues with keyboard and content sizing etc. • app size can be a problem - easily 15MB+. You will absolutely need caching and make sure your server can serve the static app files fast enough where your customers are, otherwise this may become a big problem. For example, if your AWS instance is running in one region, and you are half the world away, you may be looking into half a minute just to load the page for the first time. • debugging is still faaaar from a "normal" js/html app (console + inspecting elements etc.). If you see an issue, you pray that you will be able to reproduce it on a better-supported platform such as JVM or Android. • still somewhat limited in telemetry and logging support (I had to use a workaround to use Sentry, for example)
💯 1
👍 2
s
Indeed, my ONI seed browser is a 20 MB file. So you definitely want to make that an PWA with offline-support. And yeah, I had one person still using Windows 8.1 with no way to use my app.
For bugs I need to reproduce them on the JVM version to get a proper stacktrace. If something goes wrong with the Kotlin/WASM build you really have nothing to work with.
v
accessibility
Not a problem.
there are still users with incompatible browsers
We currently have absolutely no web support for our product, only native mobile apps. So it's a definite benefit to have a working web app up and running
app size can be a problem - easily 15MB+.
GZipped down to ~6-7MBs for Skiko + the Wasm binary + .mjs
debugging
Yeah, already noticed it's a pain
telemetry
Yeah, also thinking about Sentry or something. 😕 Mobile apps are on Firebase
Okay, thanks for the tips guys 😉