Hacker News new | ask | show | jobs
by gary_0 1832 days ago
Back when HTTP and SMTP were designed, the Internet was mostly old Unix machines talking to each other. Everything was a file full of `char`, piped to an 80-column terminal. Text-based made sense. Decades later, when the computer world was bigger, faster, and more unified, other systems kind of cargo-culted off of those earlier successes. And isn't it neat that you can telnet into port 80?

I think another big reason text-based protocols are seductive is that they're an engineering path of least resistance. When you start off text-based, how to debug and analyze and interoperate with other implementations can be put off for later, or be Someone Else's Problem. Whereas if you design the same protocol but in binary, these tricky considerations are harder to ignore -- even though text-based protocols will still run into the same problems eventually, because there's no way I'm typing in a Cookie header by hand or decoding Base64 in my head.

2 comments

And yet I have definitely copy&pasted cookie headers from the database or log files into the browser - something I’ve never done it could imagine doing with binary protocols
You could use something like Wireshark to do it with binary protocols. Also lots of binary protocols/formats support a text format to make them readable, e.g. Wasm and Capnp
>internet was mostly old Unix machines talking to each other.

Was it? By my reading there was way more weird stuff than there is today but I certainly wasn't alive back then.

In the context of popular things like HTTP and SMTP, yes, it was mostly Unix/BSD/NeXT[0][1]. Obviously the entire history of the Internet is a different story.

[0] https://en.wikipedia.org/wiki/World_Wide_Web#/media/File:NeX...

[1] https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol#...