Writing an RPC from Scratch (2021)
alexanderell.is
alexanderell.is
(strictly it calls exit on anything going wrong, but as the whole problem with rpc is the extra failure modes that's not compelling)
"...so you can appreciate the libraries that do it for you "nfs as originally designed could not fail. so what happens when something that can not fail has a failure? that's right it hangs.
On the one hand this was kind of fun, network problems, the application hangs waiting on nfs, two days later you get everything sorted out and the application comes back never knew there was a problem.
On the other hand, this is the most infuriating behavior possible, everything you touch on the system starts freezing up. and you wish it would just fail so you could fix the infernal thing.
Later the "soft" option was added so that nfs could actually fail.
It's true that error management is critical for a production environment, but from a pedagogic point of view, they can left as an "exercise for the reader".
And now it seems most CPUs are little endian anyway, so why do this conversion anymore to “network order” if you are designing a new protocol?
Also, I don't know if this is apocryphal, but as a wee lad I was told the tale that network routers worked faster because they could do coarse addressing faster thanks to seeing IPv4 addresses in big-endian, when the bytes trickled in one-by-one.