3 ms·
This is wrong; you can implement atomic transactions in filesystems. As in prepare a change, and then publish it, such that the consumers of that event only see
by kazinator 6y ago
This is wrong; you can implement atomic transactions in filesystems. As in prepare a change, and then publish it, such that the consumers of that event only see the before and after view, and not something in between. There are many ways to do this, on various scales, involving parts of a file, a whole file or multiple files. Filesystems really have no such disadvantage over databases.
Think about a remote git repo. Multiple users can push. It's based on files.
This HN site is based on files.
- skissane 6y agoCommon filesystems provide some atomic operations; for example, on POSIX systems, rename() is atomic for local filesystems (but not necessarily remote ones) There are also some filesystems which expose special transactional features beyond what common filesystems offer. For example, NTFS has filesystem transactions, although it was rarely used and Microsoft has deprecated it – part of the reason for its rare use, is that with Win32 it isn't seamless to adopt, all existing filesystem calls have to be replaced with *Transacted equivalents. (Apparently the undocumented NT level API is more seamless, but well, it's undocumented.)
- zupa-hu 6y agoHi, author here. Sure, multiple users can do a git push but don't neglect that git is also offering a higher level abstraction, basically a storage system. That's no different from running any other storage system, like a filesystem, except you name it differently. There are also other hacks to go around it but none of them is a simple solution abstracting away the complexity. Not a clean filesystem that a novice developer could start using without messing it up. They all greatly increase mental complexity.