6 ms·
Everything as a file was an interesting architecture in the 70s. The whole system was dependent on that model so it made total sense. In the 00s and beyond I th
by asim 3y ago
Everything as a file was an interesting architecture in the 70s. The whole system was dependent on that model so it made total sense. In the 00s and beyond I thought everything as a service was a better model. Called through an API. Basically RPC. But even that has failed. It's very difficult to approach a new system from that perspective. I think you can design a protocol to say what the model of interaction should be for a resource but essentially demonstrate that with a single application rather than the whole operating system. Hard to convince an engineer otherwise but the pursuit of technical perfection is often what stops something from achieving it.
- xxs 3y ago>Called through an API. Basically RPC This doesn't map well to hardware
- asim 3y agoRealistically neither do files. I think it really comes down to our common abstractions. Everything is IO. For the most part shared memory maps are what drives the most performance and ease of use.
- xxs 3y agoAccording Linus (and everything is a file) "File" actually mean byte array/"stream of bytes"[0]. The latter maps proper well to all cache hierarchy. [0]: https://yarchive.net/comp/linux/everything_is_file.html https://yarchive.net/comp/linux/everything_is_file.html
- SubjectToChange 3y agoCare to explain? How does something like procfs map better to hardware than an explicit API?
- xxs 3y ago/proc is for stuff like shell automation, not normal 'file' use. The idea is that files are just byte streams/arrays, and pretty good to be optimized. System calls will always be better than /proc, that's not the point at all.
- SubjectToChange 3y ago/proc is for stuff like shell automation, not normal 'file' use. Systems like /proc/ are cornerstones of the “Everything is a file” concept. The idea is that files are just byte streams/arrays, and pretty good to be optimized. If your point is simply that “files are efficient because they are just dumb bags of bytes”, then you are in a rude awakening.
- mike_hearn 3y agoEverything as a service is what modern operating systems do actually use under the hood. Look at the Apple stack. macOS/iOS are basically a large collection of RPC-driven microservices, wrapped behind some thin client libraries for convenience and abstraction.
- marcosdumay 3y ago> Called through an API. Basically RPC. Another L4 fan?