
The architecture is explained using the workflow of a restaurant in the following way:
Customers waiting for orders at the table are analogous to requests waiting for responses.
A single Bartender serving the requests of all customers is equivalent to a single application thread.
Tasks like mixing drinks, getting groceries, and cooking the meals are delegated to other agents which is analogous to an asynchronous system.
It functions in the following way:
Step 1: There is only a single thread open parenthesis only one Bartender to serve all customers close parenthesis running in an event loop.
Step 2: Potential blocking tasks run asynchronously thus do not block main event loop open parenthesis the cooks are dedicated only to cooking and so they do not block any other events in the restaurant close parenthesis.
Step 3: These other tasks will signal when ready for event loop response open parenthesis the cooks will respond when the food is ready close parenthesis.
Step 4: This architecture can handle way more requests at a time.