I’m creating this topic as a sort of research lab where everyone can post their technical concepts & mvps. Think less broad concepts, but more what is possible with the available data-types (and future data types)
I’ll also be using it as a soundboard for my own questions & research on what is possible with the Autonomi network.
Feel free to join in, or answer my ramblings if you have the time.
My first post comes back to the possibility of somehow embedding the ability of download a file from autonomi, directly in the browser on a webpage, via web assembly. It’s the reason why I went the route of building the web extension in the first place.
I know there are performance reasons why this wasn’t done. Running the cli in the browser would take a lot of resources - but would it still be possible, just slow? Would these performance reasons be less relevant as machines get more powerful?
Here is how I see the basic concept working:
Deploy a simple webpage to autonomi.
On this website, have autonomi cli embedded via wasm (web assembly).
When the page is loaded, it will download a file from autonomi, which will then be unzipped in browser and the data imported to in browser database.
I have many concepts that would work should this be possible.
are you sure about this? I recall “wasm wasn’t up for the job” …without an explanation why …
…one big issue is probably:
wasm can only utilize websocket communication and no native UDP traffic (as would be needed to interact with autonomi).
a https-site doesn’t allow ws without encryption (wss) so the wasm component would need to communicate via wss to a local/remote server (and that server then would need a trusted certificate and not a self signed one / the self signed one would need to be installed)
and since we’d need a relay and go through websocket the question is what benefit does come with wasm above a simple JS client relaying the queries ..?
Yeah I remember asking some team members who mentioned it was tried but wasn’t possible and I was told:
I don’t think that’s planned to be supported. It was deprecated because of some fundamental limitations of the browser. In essence the browser just isn’t capable of fully functioning as a p2p (client) node managing hundreds or even thousands of connections, gathering all chunks and communicating with the network.
It is planned to build a Node.js binding IIRC.
So if you want to build a website that runs on Autonomi, you’d have to have some kind of traditional web server backend that does the communication with the ant network.
Which essentially led me down the path of creating the browser extension & endpoint servers implementations
I’m very sure they’re targeting nodejs (‘server side’ / running within the file system) because then it can use udp sockets and has access to proper multiprocessing… So specifically not the end user browser side but only the server side/native app side of e.g. A tauri app
(in contrast to Javascript/wasm for Client side computing within the browser)