2 ms·
There's probably not as much advantage to HTTP as you think. The simplest RPC protocol is where you connect to a TCP socket, send a newline-terminated string p
by immibis 1y ago
There's probably not as much advantage to HTTP as you think.
The simplest RPC protocol is where you connect to a TCP socket, send a newline-terminated string per request, and get a similar response back. You don't need HTTP for that - you might still want to use JSON. What does HTTP give you in addition?
It's presumably still not something Erlang directly supports.
- __turbobrew__ 1y ago> What does HTTP give you in addition? HTTP2 offers lots of nice features like stream multiplexing and socket re-use. I guess also encoding standards? Less of an issue in this day and age where everything can work with utf-8. Presumably the fact that you can interoperate with other systems not part of BEAM is desirable too.
- immibis 1y agoYou also get this from newline-delimited-request-response. Multiplexing: send an ID with each request, and return the same ID in the response. Socket re-use: just keep reading until the client closes the socket. Encoding standards: you're the one designing it, so just say it's always UTF-8. Lower layers of the protocol stack ossify faster in our minds than in reality.