Hacker News new | past | comments | ask | show | jobs | submit login

Explain "web server" to your grandma. Oopsie.



> Explain "web server" to your grandma. Oopsie.

It's like a waiter at a restaurant- you tell it what you want and a few moments later, the waiter (or server) returns what you've ordered.

Good?


The waiter is the user's agent, the kitchen is the server. Each food preparer in the kitchen is a thread/process.

The waiter takes the customer's order and then waits for the food to be prepared before returning with the dish.

Asking the the waiter to ask the chef whether or not the fish is fresh is like making a head request.


Your metaphor is clearly better; grandma performing HEAD requests on fish (a URI) is priceless.

However, if granny were in a hurry, she may ask the waiter "Will my order be up soon?" to which the waiter would, after checking with the kitchen and receiving a 304 Not Modified on the still raw fish resource, he could decide to then 307 to some free breadsticks resource.

Of course, after lunch, dear granny will eventually receive a 402. Let's hope she has money today, or she may end up 401'ed and have to start washing dishes.


In fairness, that also describes FTP, POP3, and DNS.

Edit: and LDAP, and Redis, and medical PACS datastores, and RDBMS in all their multifaceted splendour... a freakish amount of programming boils down to CRUD.

Edit 2: and Gopher. I feel a little sad for forgetting about Gopher.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: