Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You still had to do a roundtrip for every single click though, right? I don't think X Windows has any kind of client side scripting system.

That's better than SSH for sure, but still not as good as the web model.



X Windows server runs on the client machine.

The client is the server application.


The point still stands, though. You need a roundtrip, even if it starts from the X server rather than the X client.


You always need some level of round trip between keyboard and UNIX procecess.

The server application isn't guessing keys, regardless of the connection format.

What matters is how the communication is being compressed and local optimizations.


The difference here is that VisualStudio code fully runs the GUI on the local machine and only file IO or external programs (compiler, the actual program being devleoped, ...) run remotely. Thus the UI reacts promptly to all interactions and many of the remote interactions happen asynchronously, thus even saving a file will not block further actions.

Whereas any non trivial X application does work in the client, thus even basic interactions have a notable delay, depending on connection.


You're assuming someone would be running Emacs on the remote machine talking to a local X server in order to edit files on a remote machine, but people would generally not do that, but use something like TRAMP, where Emacs would be running on your local machine, but accessing remote files.

TRAMP only requires ssh or telnet (or scp, rsync, any number of other methods) on the remote machine.


It shows you never used slow telnet sessions over modems.

There is no difference between doing this over text or graphics, in terms of the whole setup regarding network communications for data input and output.


Again: The key difference is that in VS.Code the UI runs local, thus all UI interactions are "immediate" and there is no difference between local and remote operation. Yes, IO has latency, but where possible that is hidden by the UI (possible: saving a file happens without blocking UI; not possible: loading a file requires the file to be loaded .. but even then the UI can already prepare the window layout)

Thisnis very different form a system, where each keystroke and each menu action has to be transfered first, before the remote side can identify the needed UI update and send that back


Again: learn UNIX distributed computing architecture.

Not going to waste more my time explaining this.


Telnet is a way more low level protocol. Please learn what you are talking about and have a good day.


Pjmlp is right. You need to read on how X was designed for remote work.


Johannes's point was, I believe, that using VSCode remotely works fundamentally different than using apps remotely via X. I don't think he is confused about how X was designed.


Designed badly, in this case.

Arguments to authority aren't appealing. Arguments from logic are. The fact is that X and VSCode's remote protocols are designed very differently, and in high-latency and high-jitter connections (and many low-bandwidth ones), VSCode's protocol is simply better.


VS Code isn't doing this with text or graphics, though. In X terms, it's running both the client and server on your local machine. It simply doesn't put the network boundary in the same place as an X application.

VS Code's "backend" that runs on the remote machine is rather only in charge of more "asynchronous" operations that aren't part of the UI's critical path, like saving files or building the project. It doesn't speak anything as granular as the X protocol.


Classic UNIX program architecture in distributed systems, apparently some knowledge lacking here.

Long are the days using pizza boxes for development it seems.


The comparison you made wasn't to arbitrary distributed UNIX programs, though. It was to X applications, which don't work this way.


I'm sorry to say I'm as confused as I was before I read these sentences.

Let me try to rephrase: with X Windows, the UI server runs on your local machine, while the UI client runs on the remote machine (e.g. your application's server). Is that correct?


No, the whole UI runs on the client machine, which in X Windows nomenclature is the server.

The client application (on X Windows nomenclature), runs on the remote server and is headless.

Instead of sending streams of bytes to render text, it sends streams of encoded X Windows commands to draw the UI.

Everything else regarding compilers, subprocesses and what have you keeps running on the server, regardless how the connection is made.

Think big X Windows terminals or green/ambar phosphor terminals accessing the single UNIX server, used by the complete university department.


I'm surprised pjmip is missing the point here. Or maybe I am

> Instead of sending streams of bytes to render text, it sends streams of encoded X Windows commands to draw the UI.

(Simplified) VSCode is sending no bytes to a server when you're editing a file. The entire file exists on the client, you can edit all you want and everything stays on the client. Only when you pick "save" is a data sent to the server.

My understanding with X Windows is as you mentioned above, you press a key, that key it sent app on another machine, that other machine sends back rendering commands. Correct? Vs VSCode, you press a key, nothing is sent remotely

Note: There's more to VSCode, while it doesn't have to send keystrokes and it is effectively editing the file locally (so fast). It does send changes asynchronously to the remote machine to run things like the Language Server Protocol stuff and asychronously sending the results back. But, you don't have to wait for that info to continue to edit.


No, you are correct. On any sort of low bandwidth or high latency connection, your remote X experience will be terrible.


Thanks for elaborating, it helped a bit and now this section of the Wikipedia article fully clicked for me:

"""The X server is typically the provider of graphics resources and keyboard/mouse events to X clients, meaning that the X server is usually running on the computer in front of a human user, while the X client applications run anywhere on the network and communicate with the user's computer to request the rendering of graphics content and receive events from input devices including keyboards and mice."""




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: