Live data from Hacker News

Spacedrive – a cross-platform file explorer, powered by a distributed filesystem

github.com

51–60 of 73 posts

Re: Spacedrive – a cross-platform file explorer, powered by a distributed filesystem

#51

Earlier quoted context omitted.

What's crufty about WebDAV? I've never used it, but it seems good enough to just use a useful subset of features to avoid the cruft.

It uses XML, which requires a library for browser JavaScript (EDIT: not true, see comment below), when filesystem operations don't really need to be more complicated than vanilla fetch requests. Also uses special HTTP methods, which isn't ideal. I've heard people say that various implementations are often incompatible with each other in some ways. I'm not sure how big of a problem this actually is in practice, but se…

> It uses XML, which requires a library for browser JavaScript,

What? XMLHTTPRequest (XHR)

People forget XML parsing is baked into JS as is XPath

But I do agree with your premise otherwise.

Re: Spacedrive – a cross-platform file explorer, powered by a distributed filesystem

#52

Earlier quoted context omitted.

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.

Plan 9 (well, 9 front at least) natively supports 9p over websockets. https://p9f.org/magic/man2html/8/websocket

That'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.

Re: Spacedrive – a cross-platform file explorer, powered by a distributed filesystem

#53
One feature a few of us toyed with for years that I'd love to see tried seriously someday (or does it already exist?) would be intelligent tag trees or maps that stuff could be plugged into, ideally that could also be shared and mixed too. More specific tags would have parent/child/sibling relationships with more generic tags, and a single tag would then pull in all the others as far as searching. So for example if I have a photo of one of my cats, and I tag it Cat Name having set that up, "calico" or "tabby", breed, plain old "cat" and anything else associated with the specific tag would all be hits. And up the stack, if I tag a picture "calico" it should show up under the "cat" tag as well automatically with no further effort. Conditionals could be incorporated too, like if there is a character who in a series has long hair, tagging "short hair" could automatically pull in "alternative hairstyle".

My big problem with typical tagging is that it's a lot of grunt work to be comprehensive. AI can help but has its own issues. While getting the UI/UX right would take some work, a universal system-wide multi-dimensional tag map could allow a lot more metadata a lot more easily. Even more so with sharing, communities could curate tag maps around areas of interest and one could stay synced with tag maps of "aircraft" or "trees" or the like which would bring in lots of technical depth to explore in a distributed fashion. Eventually maybe community AI recognition models could be an optional part of that too to help identify specific given subjects (and one would be free to then not have other kinds of things identified or shared).

Re: Spacedrive – a cross-platform file explorer, powered by a distributed filesystem

#54

Earlier quoted context omitted.

It uses XML, which requires a library for browser JavaScript (EDIT: not true, see comment below), when filesystem operations don't really need to be more complicated than vanilla fetch requests. Also uses special HTTP methods, which isn't ideal. I've heard people say that various implementations are often incompatible with each other in some ways. I'm not sure how big of a problem this actually is in practice, but se…

> It uses XML, which requires a library for browser JavaScript, What? XMLHTTPRequest (XHR) People forget XML parsing is baked into JS as is XPath But I do agree with your premise otherwise.

Ha. Honestly, you're totally right. I've used XHR for years but never actually for XML. When looking at WebDAV in the past I couldn't find a way to serialize/deserialize XML the same way you can with JSON (is there a way?), but I didn't realize XHR handles that natively. TIL, thanks.

Re: Spacedrive – a cross-platform file explorer, powered by a distributed filesystem

#55
post #53

One feature a few of us toyed with for years that I'd love to see tried seriously someday (or does it already exist?) would be intelligent tag trees or maps that stuff could be plugged into, ideally that could also be shared and mixed too. More specific tags would have parent/child/sibling relationships with more generic tags, and a single tag would then pull in all the others as far as searching. So for example if I…

My homemade photo organization software has the tags as trees and it works great for exactly the example you've given, as well as "plant" being a parent of "flower" which is a parent of "rose".

In addition to better searches, it also allows for better tagging, because a lazy tagger might tag a photo as "food" and I can come back later and fix it to be "fruit pie".

There was an open ontology database somewhere I might integrate so that it has a lot of prefilled tags. That'd be the place to start for photos or anything dealing with the physical world.

Re: Spacedrive – a cross-platform file explorer, powered by a distributed filesystem

#56

Earlier quoted context omitted.

Plan 9 (well, 9 front at least) natively supports 9p over websockets. https://p9f.org/magic/man2html/8/websocket

That'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.

Yeah... 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.

Re: Spacedrive – a cross-platform file explorer, powered by a distributed filesystem

#57

Earlier quoted context omitted.

> It uses XML, which requires a library for browser JavaScript, What? XMLHTTPRequest (XHR) People forget XML parsing is baked into JS as is XPath But I do agree with your premise otherwise.

Ha. Honestly, you're totally right. I've used XHR for years but never actually for XML. When looking at WebDAV in the past I couldn't find a way to serialize/deserialize XML the same way you can with JSON (is there a way?), but I didn't realize XHR handles that natively. TIL, thanks.

You can use a DOMParser to parse XML (or HTML) from a string.

  const doc = new DOMParser().parseFromString('', "text/xml");
  doc.querySelector("tag").getAttribute("attr") // returns "value"

Re: Spacedrive – a cross-platform file explorer, powered by a distributed filesystem

#58

This is genius. Why didn't Dropbox do this?

For the same reason all streaming services and game storefronts don't provide a generalized API to be used with 3rd party front ends. They all want to pretend that they are the only service you'll ever need/use, and their UX isn't designed for practicality, it's designed for marketing.

Re: Spacedrive – a cross-platform file explorer, powered by a distributed filesystem

#59
Sightly tangential, but does anyone know of any good system that integrates everything across devices? I'm talking backups/data management, clipboards, maybe notifications too etc. Bonus if music/video can be streamed and mouse/keyboards can be used cross device.

KDE Connect is nice and can do some of these, and many backup utilities like rclone or duplicati (which I've used in the past) can do some, but many features are not great. The closest I can think of is Apple's walled garden where you store everything on iCloud, but a) the massive restrictions on iOS, and more recently on MacOS (see: kext restrictions) are forced and b) it still isn't perfect and requires an iCloud subscription if you have more than 5gb of data you want synchronized.

I'm curious to know if any HN person knows of such software (assuming I can run a server to host the backend). (In real life I still have an "unlimited" GDrive account from my university that I use to sync but it's far from perfect.)

Re: Spacedrive – a cross-platform file explorer, powered by a distributed filesystem

#60

Earlier quoted context omitted.

Plan 9 (well, 9 front at least) natively supports 9p over websockets. https://p9f.org/magic/man2html/8/websocket

That'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.

I 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.
Post reply on HN