3 ms·
I'll argue that files and filesystems, as we know them, aren't such a great API. [1] Before we had the hegemony of Unix, for instance, it was expected that
by PaulHoule 2y ago
I'll argue that files and filesystems, as we know them, aren't such a great API. [1]
Before we had the hegemony of Unix, for instance, it was expected that operating systems had richer concepts of files, such as files which a record-oriented or block structure, ISAM [2], Record Management Services [3], etc.
What happened was that Unix inspired a generation of microcomputer operating systems, and on top of that, Unix implementation of its own abstractions are poor. For instance, I wouldn't trust any kind of file locking to work on Unix at short of "directory creation being atomic" but even Luu isn't so sure about that one. Contrast that to the Win '95 era in which you could run multiple copies of Microsoft Access on different machines over an SMB file system and expect locking to work properly.
Post-2010 or so there has been a bifurcation between distributed systems that implement simpler but more scalable and reliable 'file-like' APIs like S3 (random access writes are like... aspirational, aren't they?) vs libraries that do what old facilities like DEC's DATATRIEVE did for which I'd include SQLite, Apache Arrow and such. It used to be those facilities had some support in the kernel whereas things like that now are almost entirely userspace.
[1] https://danluu.com/deconstruct-files/ https://danluu.com/deconstruct-files/
[2] https://en.wikipedia.org/wiki/ISAM https://en.wikipedia.org/wiki/ISAM
[3] https://en.wikipedia.org/wiki/Record_Management_Services https://en.wikipedia.org/wiki/Record_Management_Services
[4] https://en.wikipedia.org/wiki/DATATRIEVE https://en.wikipedia.org/wiki/DATATRIEVE