I always wondered why Unix never added record-based files, in addition to stream-based files...like mainframes have. That would have simplified many things.
I always wondered why Unix never added record-based files, in addition to stream-based files...like mainframes have. That would have simplified many things.
You can implement record-based files (RAX, ISAM, etc) on top of stream-based files. The Unix philosophy was like Lego: small parts that do simple things that can be put together in combinations to build greater things. If you can build it from the basic blocks, it's not a basic block.
There are plenty of more advanced storage systems available for Unix. You don't need the OS vendor to supply The One.
Lots of people implement half of TCP over UDP because they want packet based transmission but also care about losing packets.
Implementing packets on top of a stream is not as trivial as implementing a stream over packets.
Implementing streaming files over record-based files is easier, you just iterate over each record and append to the stream. Implementing records in stream-based files means you have to define a framing format, internal format, bookkeeping, etc.
Record-based files would be the proper lego building blocks.
What a performance-wise nightmare. Goodbye page cache and other zero copy optimizations.
TCP offers a single reliable globally ordered stream.
UDP offers unreliable packets in arbitrary order.
What people usually want is to send whole packets(or multiple streams) in arbitrary order with configurable reliability.
TCP and UDP offer neither but UDP has the least restrictions which makes it the only protocol on which you can implement your custom protocol.
Sure. And we have, many times over. A base implementation that supported fixed and variable records, shared process mmap() access, etc...would have value. And perhaps the kernel being aware of it would have some benefit.
The idea behind the author's post is that a directed acyclic graph is a basic block that is just one layer of abstraction above raw bytes. JSON, YAML, TOML, INI, .properties, environment variables are all just different ways to represent a graph and if it were possible to store the graph directly in the filesystem then one would not have to manually [0] serialize the graph to bytes and deserialize it back later.
[0] graph -> byte conversion is the job of the graph filesystem
And the normal programmer's logic is: "if it's not already integrated in the OS then I am not going to use it". So stream files it is, forever.
I think history has proven this. People are very risk-averse even if the risk is quite minor (example: using sqlite3 instead of the file system).