5 ms·
9p won't work for web apps. Personally I think we just need a small layer on top of standard HTTP for most use cases. It's really not a very hard technical prob
by anderspitman 4y ago
9p won't work for web apps. Personally I think we just need a small layer on top of standard HTTP for most use cases. It's really not a very hard technical problem, we just need to agree on a protocol.
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.
- qbasic_forever 4y agoI'd tunnel it over a websocket, or there's no reason why you couldn't translate its verbs into a REST API. It's a super simple protocol with not a lot of complexity. 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.
- mike_hearn 4y agoIsn't translating filesystem operation verbs into an HTTP based protocol what WebDAV does?
- anderspitman 4y agoYes, and it's almost what we need. I think it's just too ossified to adapt to the few remaining shortcomings. Here's a couple: * 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.
- monocasa 4y agoPlan 9 (well, 9 front at least) natively supports 9p over websockets. https://p9f.org/magic/man2html/8/websocket https://p9f.org/magic/man2html/8/websocket
- anderspitman 4y agoThat's pretty sweet, but it's an entire additional layer of unnecessary complexity. Plus it still requires everyone to implement a new protocol into their apps. Why not use one purpose-built for it? 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.
- mike_d 4y agoYeah... computers are hard sometimes. 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.
- anderspitman 4y agoBut you don't need that level of complexity for large classes of problems.
- monocasa 4y agoI basically view WebDAV as the weird one off protocol here. 9p runs over just about any stream oriented transport (including web technologies), while WebDAV is planted firmly in web technologies.