Skip to content

Instantly share code, notes, and snippets.

@challey17
Last active January 13, 2020 04:56
Show Gist options
  • Save challey17/2ada4a9bb1b473b2c3decc85358ace3a to your computer and use it in GitHub Desktop.
Save challey17/2ada4a9bb1b473b2c3decc85358ace3a to your computer and use it in GitHub Desktop.
CLIENTS AND SERVERS
On the relationship between clients and servers in computer science and web development:
A simple analogy would be to compare the client/server relationship on the web to the customer/waiter relationship in a
restaurant.
A client is like customer and the server is like the waiter in the restaurant. The customer makes a request to the waiter to deliver something from the kitchen. The waiter (the server) then delivers what was requested or tells the customer (client) that it is currently unavailable for whatever reason.
But with clients and servers the client initially requests the html file and then requests all additional resources specified in the html file, building the entire web page.
So our waiter in the analogy would bring out the individual ingredients as the customer requests them until the whole meal is put together.
The customer can also make requests DURING the meal (AJAX). The customer can ask for something extra or something to be added to the meal once the initial resquests have been served by the waiter. Meanwhile the meal continues uninterupted while the waiter gets additional requests.
@challey17
Copy link
Author

clients serversdrawing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment