3 ms·
I always wondered why Unix didn't come with a standard record based file in addition to the stream based file. Mainframes and other OSs, like VMS, for example,
by tyingq 6y ago
I always wondered why Unix didn't come with a standard record based file in addition to the stream based file. Mainframes and other OSs, like VMS, for example, have both fixed width and variable width record based files.
So, if you're writing a database, there's already a bullet proof and fast backend to store things that comes with the OS and is maintained. No need to evaluate various layers on top of a stream (RocksDB, LMDB, etc).
- rakoo 6y agoBecause then everything is not a file, it's either a stream-based file or a record-based file. So you don't have a uniform API for everything. The UNIX way would be to have a filesystem that does all the internal logic of checking line width, and allow the user to mount it. One API, different functionality
- tyingq 6y agoWell, we re-invent it anyway on top of stream files, so I'm not sure I get the difference other than fragmentation of solutions.
- rakoo 6y agoBecause in the UNIX way you'd have one process for providing record-based files, one process to write to/read from them, one process to parse the query language into an AST, one process to maintain indexes, etc... and all of this would be bound by a big jar of glue-shell. It's much easier to just do everything inside a single software as a monolith than to distribute functionalities, I don't think one needs to look further than that