Lawrence D’Oliveiro <l…@nz.invalid> wrote:
> On Fri, 13 Nov 2026 15:05:00 +0100, Alexander Schreiber wrote: >
>> Lawrence D’Oliveiro <l…@nz.invalid> wrote:
>>> >>> Perception doesn’t count. That’s reality. You can’t *pretend* to >>> offer interactivity: you really have to have support for >>> interactivity built into your architecture from the lowest levels >>> up. You can’t build per-character response on top of block mode.
>> >> You absolutely can and the interactive web proves it.
> > The interactive web is not run on mainframe-style block-mode > terminals.
I did not claim so. But the basic concepts of: - smart local terminal - data transfer between terminal and server not keystroke-by-keystroke but in functional blocks of data underlies both, hence one could argue that they share underlying functional ideas, however massively they differ in the user experience.
>>> WebSocket connections are asynchronous full-duplex connections -- >>> that’s not “RPC” by any stretch.
>> >> Of course it is. RPCs come in various kinds, from the classic >> one-shot (establish connection, send request, wait for and read >> response, close connection) to streaming RPCs.
> > “RPC” stands for “Remote Procedure Call”. It’s emulating a procedure > call over a network connection. You know how a procedure call works, > don’t you? The caller transfers control to the callee, waits for the > callee to do its thing and return a result, whereupon the caller > resumes execution again.
Thanks for the refresher, so local procedure calls still work the same as back then when I wrote code that involved the occasional function and/or procedure call (yes, there are languages where there is a difference)? That's a relief. But that's not how RPCs work. Most importantly, there is no transfer of control, the local system can continue executing code while writing to or reading from the remote system. In the most simple case: - local code connects to remote system - writes to it to invoke a defined endpoint there, optionally writing arguments to that endpoint - reads back the results - disconnects One can do that as a full straight run of blocking network I/O. More commonly, the network I/O is mixed with ongoing local execution and calls to select(2) or epoll(7)/kqueue(2) to not block the caller waiting for the callee or the network, plus one wants timeouts to avoid waiting forever.
> And nobody ever described block-mode mainframe terminals as running > any kind of “RPC” either. The “RPC” concept was only invented after > mainframes had been around for a few decades.
Because the concept, as you pointed out, was not invented when block mode terminals where the new hot stuff. In retrospect, there are functional similarities between those block mode terminals and web services, which might be more obvious if one uses a terminal browser like links for the web (which of course limits one to sites that don't rely on JavaScript and lots of graphics for their function).
> Before getting even deeper into your love for RPCs and seeing every > kind of network protocol as RPCs, maybe you should read this
Professional bias. I work in an environment where every in-house binary is always both an RPC server and an RPC client - RPC traffic is everywhere. So one tends to recognize the pattern. Yes, proper designed-as-such RPC systems have defined endpoint naming structure (e.g. Service.Method), well defined serialization (such as XDR or protobufs) and proper builtin error handling and signaling mechanisms. That never stopped anyone from not doing things that way and e.g. just pushing raw bytes with no metadata (type, size, etc) over the ether (or worse, Python pickles) ...
Interesting read, but it is painfully obvious from the text (even without peeking at the date) that this was written in the very early days of networked services (and the dig at the ISO model is also a nice tell). A lot has happened in computer science in the last almost 40y. In modern networked service infrastructure, the pain points the paper raises have pretty much all been dealt with in various ways. It does neatly demonstrate how painful and primitive (from todays perspective) networked service were at times back then, though.
>> Even HTTP, which is not exactly the most efficient RPC method, came >> up with streaming RPCs: HTTP 1.1 pipelining, where multiple requests >> are handled within the same TCP connection.
> > Those don’t work for RPCs, though.
Running multiple RPC requests over HTTP 1.1 pipelining is going to be problematic at best and for obvious reasons, sure. But it does work when you consider it a primitive (half-duplex) streaming RPC with multiple sub-requests. Again: I see HTTP functionally as _a_ RPC system, which works reasonably well in the constrained functional space HTTP was designed for and has evolved in. Should you use it as a generic RPC system? Of course not, that would be silly (and I write that as someone who used ssh as primitive RPC system before).
>> And "asynchronous" just means you don't do blocking reads and >> instead use the framework equivalent of select(2) for a more fluid >> interaction.
> > Well, maybe not select(2), maybe something more modern?
Sure, hence "functional equivalent", e.g. epoll or kqueue - or whatever higher level abstraction (such as Promises/Futures in Java) is offered by whatever language or framework one uses. Kind regards, Alex.
-- "Opportunity is missed by most people because it is dressed in overalls and looks like work." -- Thomas A. Edison