I'm kindly requesting feedback. I've implemented a...
# webassembly
r
I'm kindly requesting feedback. I've implemented a complete realworld.io example application with my new Kotlin/Wasm Kilua framework. It works with full SSR (Server Side Rendering), supporting remote api calls, state serialization from the server to the client and automatic cache. The same Compose based application compiled to Wasm is executed in the browser and on the server (in a Node.js subprocess managed by Ktor). I've published this test application on a temporary address - http://lexx.finn.pl (no SSL!). I'm asking for some feedback about ssr, performance and overall user experience. Note, the application itself is compatible with realworld.io specification, so don't judge the app itself 😉 More info about realworld is here: https://github.com/gothinkster/realworld and the sources for my app can be found here: https://github.com/rjaros/kilua/tree/main/examples/realworld . Thank you for your time!
kodee happy 3
🔥 9
a
Nice work! I compared it to https://conduit.realworld.how/ and to be honest the Kilua version feels a little less snappy, e.g. when loading the details for a post - but apart from that it’s impressive that you build all of that with K/WASM wasm
🙏 1
p
You can add some http headers for caching http://lexx.finn.pl/kilua-project-examples-realworld-wasm-js.wasm . Now on each reload it is fetching again. The same is with js and css
🙏 1
l
pretty cool, but yeah https://conduit.realworld.how/ feels faster to open pages, you can’t even see any loading bars with https://conduit.realworld.how. vs with your sample the loading bar is noticeable? Why might that be?
y
http://lexx.finn.pl loaded really fast on my safari ios browser.. the performance and ui was very smooth
Now how can we develop something similar ? Can you please provide some documentation/videos tutorials of the same.. thanks!
Also can one use compose functions?
r
@Luca my application works a bit differently. My app shows an empty page with loading bar while loading the data. The original app loads the data while still showing the old page, and shows the new page when it's done. The UX could be better or worse depending on the api performance. But I'll work a bit on this (edited: I've made some changes).
@Yogeshvu Kilua is based on compose runtime, so all typical compose elements (composable functions, remember, state) can be used. I'm working on 0.0.1 release to maven central, but I've just migrated the project to Kotlin 2.0.0-RC1 and have to do a bit more testing.
@Yogeshvu The funny thing is probably the application doesn't work at all in your safari browser 🙂, since safari doesn't support Kotlin/Wasm. Check your browser console! I suppose you just see how fast is my server side rendering engine 🙂
y
Oh, then its possible that I am looking at the ssr page..
l
@Robert Jaros what functionality is being blocked by the lack of wasm support in safari? Seems weird that the site seems to work besides the errors in the logs
r
I think you won't be able to register or login.
👍 1
And it's not really so weird, in fact it's the point of SSR to have browsable content without any JS/Wasm running. If it's readable for you, it's definitely readable for Google bot as well.
👍 1
l
makes sense