Hacker News new | past | comments | ask | show | jobs | submit login

This sort of atomic change should be something the filesystem provides. I think it’s crazy that databases have had mechanisms for transactions and rollbacks since the 70s and they’re still considered a weird feature on a filesystem.

There’s all sorts of ways a feature like that could provide value. Adding atomicity to system package managers would be a large, obvious win.




NixOS has this. Atomicity is implemented via the filesystem: the final switch between states is changing where a single symlink points from once place to another, which is an atomic operation on Linux and maybe elsewhere.

Transactional filesystems still sound cool, but Unix filesystems already have enough features to implement atomic package installation on top of them.


> Unix filesystems already have enough features to implement atomic package installation on top of them.

Yes, but it’s pretty awkward. You need to do the final commit via a rename or symlink. It would be far more convenient if you didn’t need to do that.


I agree. The fact that we're still doing atomic writes by renaming files is laughable. That's also pretty much the only atomic thing you can do.

I think the issue is the posix filesystem API. Nobody writes better filesystems because no software would use the new features, and no software supports fancier filesystem features because the posix API doesn't expose them.

It'll probably take someone like Apple or Google to fix this. Similar to 16kB pages.


> Nobody writes better filesystems

People tried: https://en.wikipedia.org/wiki/Transactional_NTFS and https://learn.microsoft.com/en-gb/windows/win32/fileio/depre...

"[Transactional NTFS (TxF)] was introduced with Windows Vista as a means to introduce atomic file transactions to Windows. It allows for Windows developers to have transactional atomicity for file operations in transactions with a single file, in transactions involving multiple files, and in transactions spanning multiple sources – such as the Registry (through TxR), and databases (such as SQL). While TxF is a powerful set of APIs, there has been extremely limited developer interest in this API platform since Windows Vista primarily due to its complexity and various nuances which developers need to consider as part of application development. As a result, Microsoft is considering deprecating TxF APIs in a future version of Windows"


And even more ambitiously, WinFS: https://en.wikipedia.org/wiki/WinFS


Not really.

It was tried by one specific team, in one politics-guided environment. It was bounded to a ton of unrelated features because of politics, it was bounded to a specific API because of politics, it was bounded to a timeline and a team because of politics, and it was about a completely different OS.

We have no idea even how it went, because we can't trust the people reporting about it are talking about the correct thing.


"Nobody has written a hashing/bit-rot detecting filesystem"

"ZFS is one"

"It's not really because it was written by a team, and because it was made for Solaris which is a different operating system, and there was lots of politics involved with its licensing, and because it was bound to the POSIX file API, and because it does complex volume management as well, and because it happened within a timeline before Sun went out of business, and we even have no idea how ZFS went because every documentation and article which says it's about ZFS might be talking about something else".

uh huh.


If you used it as an example of why it always fails. And it failed because Sun was dysfunctional, then yeah, you could have a usable metaphor.


Iteration is a lot easier in userspace than in the base system.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: