DEV Community

Cover image for Web Servers Explained by Running a Microbrewery

Web Servers Explained by Running a Microbrewery

Kevin Kononenko on May 17, 2018

If you can understand the different inputs and outputs of a microbrewery, then you can understand how a web server works. When you are just gettin...
Collapse
 
val_baca profile image
Valentin Baca

Good stuff and solid analogies.

I do think it's funny that we ended up with names like "server", "request", and "port" because they were analogies to the real world. Now we've come full circle and are coming up with real-world analogies.

A server, like a server (or a waiter) at a restaurant, handles your requests.

A port is like a shipping port, a place for requests to come in or be sent out.

etc.

Collapse
 
kbk0125 profile image
Kevin Kononenko

Totally agreed, Valentin, I was actually thinking about this the other day. A lot of people use a tree to represent the Document Object Model (DOM) as well, another metaphor.

I was thinking about it cuz I was wondering, if these metaphors are built in, why are my analogy-focused explanations still needed?

I think a lot of it comes from the fact that the developers who wrote these languages have incredibly complex mental models after years of programming. So, they might represent a concept one way, but it is still tough for a beginner to understand that representation.

Collapse
 
inceptioncode profile image
Darrell Washington

And this kids, is why we don't want to make too many client request on our website. Lol Good stuff Kevin.

Collapse
 
kbk0125 profile image
Kevin Kononenko

Haha thanks Darrell!

Collapse
 
codeitbro profile image
CodeItBro

Loved it. Thanks for writing this post :)

Collapse
 
kbk0125 profile image
Kevin Kononenko

Very welcome!

Collapse
 
threedeeprinter profile image
Dan Benge

As long as it's not IPA. :)

Collapse
 
kbk0125 profile image
Kevin Kononenko

Agreed there... although I feel like you and I are the only ones.