Live data from Hacker News

Userspace FUSE for macOS

fuse-t.org

41–50 of 137 posts

Re: Userspace FUSE for macOS

#41

Why does everybody use tcp ports instead of file sockets for local communication?

Unix domain sockets have a severe limitation that the path must be a maximum 108 characters.

That’s plenty for most applications, no? /var/run/*.sock isn’t that many characters.

Re: Userspace FUSE for macOS

#42

Earlier quoted context omitted.

Unix domain sockets have a severe limitation that the path must be a maximum 108 characters.

That’s plenty for most applications, no? /var/run/*.sock isn’t that many characters.

For many applications it is enough. For others, such as placing a UDS in a user's home directory or temp folder, it may not be. Often times you don't know ahead of time what the path may be.

Re: Userspace FUSE for macOS

#43
post #19

Why not use the file provider API? https://developer.apple.com/documentation/fileprovider

The File Provider API is very limited. In particular, it can't be used to implement file systems where the directory hierarchy is dynamic. It can't materialize directories on `chdir(1)`, for example.

The design was obviously tailored for providers that implement real disk files, like Dropbox and Apple's own iCloud Drive.

Btw, Apple also ships with an undocumented 9P implementation. It seems to be used for mounting the host filesystem in virtualized guests. It is unclear if it can be made to work over a normal (non-PCI) transport like TCP.

Re: Userspace FUSE for macOS

#44
post #23

Earlier quoted context omitted.

Because your software was written against FUSE and you don't wanna spend time rewriting it to accommodate Apple users.

I meant why not make a project like this that emulates the FUSE API, but use the file provider API to present the file system to the OS instead of NFS. It would have the advantage that it would be better integrated with the OS, for example you can display upload progress indicators on files in Finder. Maybe that can also be done with NFS though, I don't know.

It's impossible, see my other reply.

Re: Userspace FUSE for macOS

#47

Earlier quoted context omitted.

Yeah, but easily switching between specific version of PHP, MySQL, Node.js, etc, without messing with /usr/local/bin and brew while having full speed disk access goes a long way. I could probably get by with the chroot support that macOS has, but I never manage to find the motivation.

You can install multiple versions of PHP and Node alongside each other just fine using Homebrew: brew install php@7.2 php@7.3 php@7.4 php@8.0 php@8.1 # and soon php@8.2 brew install node@18 node@16 node@14 node@12 node@10

Installing multiple versions is solved, changing the environment easily, not so much, I think

Re: Userspace FUSE for macOS

#48
post #14

Earlier quoted context omitted.

Nit: NFSv3 is stateless, V4 isn't (sessionid and clientid permit stateful handling of locks and shares). I would assume this person is just doing an in-memory "NFS server" that would keep all of that state around. So it's more like a FUSE-compatible layer that speaks NFSv4 as a "front end" (since NFS clients are better than "ha ha, surprise! This FUSE backend is networked and can fail on weird ways"). I'm not sure ho…

With it being stateless, I was referring to just the part where I wanted to point out the difference: file handles are stateless, while FUSE's equivalent (nodeids) are stateful. Regardless of whether it's an in-memory or persistent solution, the problem remains: fuse-t has little choice but to leak resources of the underlying FUSE file system, as there is no valid point in time in which you can issue FORGET operation…

I don't understand the comment about leaking memory, nfs file handles don't have to be persistent. Besides, how many FUSE filesystems implement FORGET? Anyway this is the reason I went with NFSv4. I started the project with NFS v3 but then discovered many limitations: being stateless, no named attributes, questionable locking support, etc. So Eventually I dropped it and re-implemented everything on NVSv4.

Re: Userspace FUSE for macOS

#50

Earlier quoted context omitted.

You can install multiple versions of PHP and Node alongside each other just fine using Homebrew: brew install php@7.2 php@7.3 php@7.4 php@8.0 php@8.1 # and soon php@8.2 brew install node@18 node@16 node@14 node@12 node@10

or just use asdf

I wasn't aware of it, thanks. I'm not it's exactly what I want though. Can it easily start and stop daemons? Can it assign different ports to different versions?
Post reply on HN