4 ms·
One could argue that this would be a bad abstraction because it hides the network layer.
by rerx 6y ago
One could argue that this would be a bad abstraction because it hides the network layer.
- enriquto 6y agoOn the contrary. The only valid interfaces should be fopen, fread, fwrite and the like. The unix way is to mount the network as a filesystem cat /net/http/www.google.com this should render other tools like wget, curl, unnecessary.
- wahern 6y agoThat's the Plan 9 way. The "everything is a file" model mostly relates to exposing all objects as file descriptors that support read and write operations--specifically the read and write syscalls. IOW, everything is a file means the universal API for all objects[1] is read and write. How you acquire the descriptor is a fuzzy area. Using open on virtual namespaces makes alot of sense, but not always, and in any event no incarnation of Unix, not even Linux, supports virtual namespaces as comprehensively and seamlessly as Plan 9. [1] From a systems programming standpoint--kernel resources, IPC, etc. But there's an obvious relationship to, e.g., Smalltalk objects. (Just don't ask me what it is ;)
- enriquto 6y ago> Using open on virtual namespaces makes alot of sense, but not always Can you point to a specific and clear example of that "not always"?