Is this accurate or they mean Desktop? - This is w...
# random
p
Is this accurate or they mean Desktop? - This is what the whole world has been waiting for?
j
Given web apps are generally just frontends that make API calls to services, how do they plan on actually incorporating a database into that ๐Ÿค”
p
Well I have been talking about that for quite some time. It will disrupt the whole webapp architecture business. For a good purpose tbh. Better performance
j
But how will we get "better performance"? It sounds like the proposed architecture is a client-side database? You'd be exchanging initial load time for that performance gain, and you'd lose your centralized database ๐Ÿค”
p
Well, I believe the db will be provided by the browser at some point. WRT the centralized db, Android and iOS has been doing this forever and nobody has died. Yes, a bit more complex to handle but nothing that hasn't been done before. Basically a hijack of Android architecture over the web. But honestly, I do think webapps send a lot of unnecessary data to the backend storage.
Obviously the big win is in App maintainability, those teams doing compose web don't have to worry about abstracting the js/wasm target no more.
๐Ÿ’ฏ 3
j
Ah so it'd be used to maintain a local cache, makes sense Are there not already strategies for this on web though?
p
There are but, most solutions involve complicated setup and/or full serialization/desirialization of the data to save/retrieve.
s
I hope this means that Room can now use IndexedDB.
๐Ÿ‘€ 3
โž• 2
j
Ohh this is interesting ๐Ÿ™‚ https://developer.android.com/jetpack/androidx/releases/datastore#1.3.0-alpha05 Implement WASM/JS support in DataStore via
localStorage
. This creates a distinct advantage over the existing
sessionStorage
implementation by enabling cross-tab event notifications and synchronization. (I67246, b/441511612)
๐Ÿ‘€ 4
m
Via localStorage? Are you kidding me? I single image of mine would already blow that up due to memory constraints. Let's talk again when they are on OPFS.
๐Ÿ‘€ 1
โž• 1
s
Michael is right, that doesn't seem to be a proper solution. It's very limited. The right solution would be to use IndexedDB.
s
IndexedDb should be the targeted solution for sure.
m
At least room3 is using OPFS as I have suggested which makes more sense. See: https://developer.android.com/jetpack/androidx/releases/room3#3.0.0-alpha01 I think I'll have to have a closer look at room3 if I find the time.
๐Ÿ‘ 2
s
@Pablichjenkov where can i read this article -
s
It's not an article. It's an upcoming talk at KotlinConf
๐Ÿ‘€ 1
โ˜๏ธ 1
s
Just filled a issue becuase there is no room3-paging wasmJs support - https://issuetracker.google.com/issues/492780663