by qbasic_forever · 4y ago · 0 comments
I believe most VMs use 9p as a low level protocol for syncing filesystems between host and VM or container.
But it's a chicken-egg situation. App developers aren't going to develop against a protocol that no one uses, and no one's going to use a protocol that doesn't have any apps.
Also, WebSockets bring some nontrivial complexity. This can bite you with things like proxies and custom backends, which have to implement a special code path from normal HTTP to handle WebSockets.
If you want to read and write files, there are plenty of operating system APIs to do it super simple. If you want low level access to file systems and to get into the complex parts... well WebDAV sucks because the underlying problems of file systems suck.
It sounds like you're after a federated storage protocol though, i.e. something that two totally different apps can use to allow a user to transfer data between them. This is a much, much bigger leap in complexity and requires a very strong authentication and authorization story. IMHO look into the fediverse and whatever is going on with storage and files there.
* Doesn't specify a federated authentication/authorization mechanism to allow self-hosted instances to work with each other. This includes things like how to have an app delegate permissions to other apps, ie for things like launcher apps which can open external apps and give them access to only specific files.
* Doesn't specify a way to implement image thumbnails/previews, which is necessary for any sort of remote file explorer or gallery app.