5 ms·
The thing that I find hard to defend is that plan9 turns all internal service / api calls into text based / filed based protocols, with parsing involved. This f
by enqk 4y ago
The thing that I find hard to defend is that plan9 turns all internal service / api calls into text based / filed based protocols, with parsing involved. This feels so inefficient and adhoc, and requires more documentation
- zozbot234 4y agoWhat's the alternative? Binary protocols tend to be dependent on machine specifics such as endianness and alignment requirements, which would be a non-starter on a network-focused OS like Plan9 - as well as poorly extensible and not always properly documented. There are some well-known pitfalls wrt. text formats, such as parsing and emitting floating point numbers (which is why hexfloats are a thing) but for mostly everything else they're good enough.
- AnIdiotOnTheNet 4y agoThere is no reason that binary protocols have to rely on endianess or alignment. Reversing or realigning a field is orders of magnitude faster than parsing text, so just pick one and stick with it.
- sanxiyn 4y agoNote that 9P is in fact a binary protocol.
- torginus 4y agoI'm not sure - first of all, turning everything to a text-based protocol might be something can be fixed - it's not impossible to amend the specification to allow for binary protocols, or - if the caller and callee are on the same machine - literal system calls. But the important thing to not is this fixes the biggest issue of modern Linux - the lack of stable API/ABI - that requires everything to be compiled for every distro. It also naturally documents each program's interface allowing them to be easily rewritten/mocked/logged/debugged etc.
- origin_path 4y agoThe reason software has to be recompiled so often on Linux is not to do with ABIs vs text based protocols. It's because the act of compiling on Linux is used by the toolchain developers as a signal to automatically 'upgrade' the resultant binaries in various ways. In other words, the tooling and frameworks don't place any cultural value on making it easy to target older versions of the OS from newer versions. There's no particular reason it must be so. The Java compiler has a --release flag that lets you say "I want to run the results on Java N" and then the compiler won't use any bytecode or library features that were added after that time, even if it otherwise would automatically and implicitly do so. The result is still binary and non-text based, but there's nothing magic about it. That sort of feature simply takes work that the Linux community is culturally opposed to doing thanks to the fully centralized model.
- protomyth 4y agoIt does make one wonder what happens if everything is a type instead of a file. Do you get a command line that looks like Mathematica? I too think every program containing a parser is a waste.
- Iwan-Zotow 4y agoHello, Powershell
- protomyth 4y agoThey do so little with the concept and tooling its easy to forget how Powershell works.
- butterisgood 4y agoDistributed systems are often message based systems involving parsers etc. And making things work this way everywhere is a way to achieve network transparency. So, it's pretty easy to defend if you care about network transparency above the highest possible performance.