Lawrence D’Oliveiro <l…@nz.invalid> wrote:
> On Thu, 12 Nov 2026 10:49:34 +0100, Alexander Schreiber wrote: >
>> Lawrence D’Oliveiro <l…@nz.invalid> wrote:
>>> >>> On Wed, 11 Nov 2026 12:15:20 +0100, Alexander Schreiber wrote: >>>
>>>> Lawrence D’Oliveiro <l…@nz.invalid> wrote: >>>>.
>>>>> Nowadays we have millions of users on social media >>>>> simultaneously, but that request/response paradigm is no longer >>>>> sufficient for the real-time interaction requirements.
>>>> >>>> The "Unix serial terminal" model never applied to web interactive >>>> traffic, that was always running on the "smart terminal doing >>>> local edits - mainframe style" model.
>>> >>> Again, you’re thinking in terms of an analogue of the old mainframe >>> block-mode terminal. Real-time interaction requirements on the Web >>> involve more than just the strict request/response model: you also >>> have AJAX and WebSockets to provide a far greater level of >>> interactivity. Block-mode terminals have no analogue to such >>> functionality.
>> >> You are thinking too much from a "what the user sees" perspective.
> > 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. Yes, in the most simple case you build the entire page server side and then sent it to the client - think 1990s CGI scripts with no JavaScript. These days, things are of course typically more complex to enable the kind of interactivity that used to be the prerogative of native apps.
>> Under the hood all the "Real-time interaction requirements on the >> Web" boil down to RPC traffic - be it a browser loading a page or >> the JavaScript running on that page fetching more data.
> > 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. 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. And "asynchronous" just means you don't do blocking reads and instead use the framework equivalent of select(2) for a more fluid interaction.
> Think of how “doomscrolling” works: the page is continually fetching > more data to update itself.
And how does the page update itself? The JavaScript code running notices "end of currently rendered page about to come into viewport" and fires off RPCs to load more content to be rendered and displayed.
> Think of how Discord works: type some text and press Enter, and your > message is immediately visible to everyone else on the same channel.
Because the Discord app sends an RPC to the backend server with that text and all the various other clients get either get push notifications with that message (over long-lived connections and streaming RPCs) or a callback notification "hey, new content" and then do an RPC to get it (I haven't looked into the implementation for Discord).
> Just start typing, and others are notified of that, too, so they can > wait to see what you are going to say before adding their own > comments.
Does discord really show the text to all channel members while you type it? That sounds annoying. But anyway, that's just more RPCs, likely streaming RPCs to keep the overhead down. How else do you think that works under the hood? Distributed crystal balls? Smoke signals?
>> In fact one can think of the mainframe block mode terminals as RPC >> clients ...
> > Maybe you can, but that’s not how the interactive Web works.
Once you take off all the colorful user-side front ends, that's exactly how it works. It's just not exposed to the user - like it was with block oriented terminals - and all hidden under several layers of content transport and presentation logic. But peel back the various layers of UI code and update logic and at the bottom you'll find RPC traffic. I've run enough of the backends for that ;-) Just because most web app developers these days never dive down all the way to the bottom of their stack where the RPCs happen doesn't mean they aren't happening. Kind regards, Alex.
-- "Opportunity is missed by most people because it is dressed in overalls and looks like work." -- Thomas A. Edison