Skip to content

Comment on Explain “Event-Driven” Web Servers to Your Grandma

Comments

Hmm, perhaps a closer analogy:

Traditional Web Server:

The pizza shop receives a call for the initial order and starts the pie. Then the customer calls back periodically to check if the pie is done because the pizza shop cannot call back or deliver.

No I don't think so. He is talking about a single request here, you seem to be talking about a session.

The best pizza analogy I could come up with is:

In a traditional web server, the person making pizzas only makes one at a time and can't do anything else until that pizza is done and delivered. In an evented model, each pizza maker makes many pizzas at once, and just watches for events (the oven timer goes off) and acts on them. (takes the pizza out) Sometimes if a task is taking him too long, he'll ask an assistant to work on it so that he can get back to making pies.

The commenter (on the linked blog) who said that the pizza shop has a small number of call-takers that put calls on hold until they are ready to service them makes a better analogy.

Much better. Calling the customer back? That would be magic.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.