3 ms·
Beating a dead horse here... "But I still like the dig at X getting server and client confused." A "server" is something that accepts requests and multiplexes
by mcguire 3y ago
Beating a dead horse here...
"But I still like the dig at X getting server and client confused."
A "server" is something that accepts requests and multiplexes some resource; a "client" makes requests. The X server is a server in that it multiplexes access to the UI hardware. Don't be fooled by the way a client gets event notifications from the server. (That's mostly just the tip of the iceberg of problems with the "client/server" idea.)
The book remains wrong.
- DonHopkins 3y agohttps://news.ycombinator.com/item?id=25736735 https://news.ycombinator.com/item?id=25736735 mcguire on Jan 11, 2021 | parent | context | favorite | on: XTerm: It's Better Than You Thought Don, did you ever figure out the difference between a "client" and a "server"? DonHopkins on Jan 12, 2021 [–] Sure: xterm a client of your display and keyboard and mouse, remote input and output services that the X11 server provides over the network. And at the same time, a web browser is the client of computing and data servers in the cloud, provided over the network. In reality, there can be many different client/server relationships existing in different directions over the same full duplex network connection. It's really a bi-directional multiplexed messaging channel, not a pure strict hierarchical relationship, and many client/server dependencies can go both ways over the same connection, at the same time. You can even run an ssh that opens tunnels in both directions, then tunnel X and http connections over that. Once a connection is established, it really don't matter which end initiated the connection (or how many links and proxies and tunnels there are along the way) -- you're just sending messages both ways. "Client/Server" is an over-simplified way of describing what's possible. ddingus on Jan 12, 2021 | parent [–] Only the server, actually serves the graphics to the user. Within the context of the X Window System, the server is the body of code responsible for delivering the display to the user viewing it. bitwize on Jan 12, 2021 | root | parent | next [–] > Only the server, actually serves the graphics to the user. The server actually serves the user to the remote client. It's like "you are not the customer, you are the product". The remote program needs to communicate graphically with you, and connects to the X server to do this; therefore, you are not the requester of a resource, you are the resource being served. :) ddingus on Jan 12, 2021 | root | parent | next [–] I like it. Clever, and current context relevant. Cheers. DonHopkins on Jan 12, 2021 | root | parent | prev | next [–] Great analogy. Think of it like Amazon Mechanical Turk. mcguire on Jan 13, 2021 | root | parent | prev [–] Think of it in terms of a print server. It's a long-running process that other processes connect to, in order to request a service. It handles the "impedance mismatch" between the clients and the hardware it controls---in the case of a print server, it demultiplexes requests and translates them into something the printer can deal with; in the case of X, it displays the information as requested by the client and provides notifications of events as requested by the client.