Welcome back.
So this video is going to function as a sort of crash course in how the Internet works.
For someone who wants to be a developer so it's meant to take you from avid Internet user like me who
maybe doesn't understand a lot about how the Internet works because you don't have to to someone who
still uses the Internet all the time but understands a little bit about how it works at a high level
.
It might be surprising but developers really don't need to know that the very low level nitty gritty
about different data protocols and how they work in this TCAP IP stack in things that you may hear that
are very intimidating.
That's an entire discipline there's entire college majors and courses devoted towards how the Internet
works at a low level.
As a developer things are abstracted away so that we only need to understand the very basics more than
your typical user of the Internet.
But we don't have to be experts on all this very intimidating nitty gritty stuff.
So few things we want to do here.
We want to understand at a high level how the Internet works.
Things like HGP IP domain names you are elsewhat are all those.
How do they work together.
We want to understand the difference between front end and back end element.
Also full stack where does that fit in.
And then we also want to be able to view the H Tim L on any website.
So the first thing that I want to do here is actually watch a video.
So the link is in the slide.
It's also in the description of this video going to go ahead and open it up.
Feel free to watch it on your own.
I'm going to watch it in this video and just pause it a few moments and highlight a few important pieces
.
Have you ever wondered what happens when someone in England visits the World Science Festival web page
first.
Their computer needs to ask the World Science Festival server for a copy of that web page.
The computer sticks this request into a virtual envelope called a packet wrapped with specific information
about that request including the world's science festivals IP address the computer sends this packet
out of the house and below the street via a large underground copper wires it passes through small regional
networks before ending up here at Telehouse north in London.
Telehouse north is England's main Internet hub.
The IP address on this packet tells the hub that the world science festival server is actually in Lausanne
and the first thing I want to just highlight there the user in this case went to a Web site.
World Science Festival Web site or type that in and then hit enter and all of this is happening before
the user sees anything.
The idea is that a user is asking for a website or requesting it.
And that's what it's called it's an H TTP request.
So when I opened up this video YouTube dot com slash this you know when I hit Enter I'm asking for the
contents of this page and that has to go all the way to YouTube somewhere and they have to send it all
the way back to me.
So so far we're still just getting the request to the right place.
So Telehouse North sends the packet out is like across the Atlantic over fiber optic cables buried deep
beneath the ocean.
The packet ends up here 60 Hudson Street New York City the largest Internet hub on the East Coast.
This hub sends the packet through a series of regional networks connecting New York to Los Angeles where
the World Science Festival server resides.
The server reads the request and gets ready to send the web page to English.
But web page is made up of images and text are too large to send as a single packet of data.
So how do we get it back to England.
Imagine that.
So at this point the request has made it all the way to the correct server and it's told that I'm looking
for this page.
And so now everything is on the return journey going from the server all the way back to the computer
that asked for this specific page group of 5000 tourists visiting New York City in a single gigantic
tour bus.
They are way up in Harlem but they want to visit the Statue of Liberty before it closes.
But it's rush hour on a Friday.
There's no way that giant bus is going to fit through those crazy congested streets.
So they decide to get off the bus and spread out some take the subway.
Some take cabs a few rent bikes and some even take kayaks down the Hudson River.
How they get there doesn't matter as long as they get there on time.
Likewise for the Internet to work efficiently.
This web pages pulverized into thousands of tiny packets of data each one racked with all of the information
that needs to rebuild itself in the the kids are sent to L.A. one will sure hub which checks the traffic
report before sending them on through miles and miles of land.
They travel checking in through different hubs like are New York City tourists those packets don't care
how they get there as long as they get there as fast as possible.
Most of them will go through 60 Hudson in New York where they are redirected back to England is like
riding a fibre of glasses thick as a silver dollar.
Then back on copper wire through regional British networks into all the packets reached their destination
.
And and this epic journey it all happens in about a second along with trillions upon trillions of similar
journeys that happen each and every day on this remarkable easy to take for granted network of networks
we call the Internet.
So hopefully you found the video fascinating.
It certainly blows my mind even you know someone who does this a lot and who uses the Internet a lot
.
Makes Web sites makes applications.
It's still so amazing the process that happens behind the scenes just for every single page that loads
just reiterate.
Let's take this example of when I go to this you around here and we dot com slash courses and I hit
enter.
Remember I'm asking for something and I'm getting something back and requesting something and the server
is responding.
And there's a lot of stuff that happens in between.
But that's the core concept.
So the very first step that happens and actually before I start there I want to let you know this is
not something you need to memorize.
This is purely conceptual stuff that is nice to know but you can always come back.
You can look this up.
You can watch this video up.
The one thing I really want you to memorize and to be confident in is this idea of requests and responses
asking for data and a server giving you that data and then your browser displaying it.
So this step here when I go to you or I hit enter the first thing that happens is my computer needs
to know the exact address to send a request to.
Which is just like when you send a letter you need to have a unique address.
No home has the same address as another home.
They might look the same but they're in a different city or different different zip code or different
country.
They are unique.
So we need that address so that our request goes to the right place.
So the Sinko DNS it takes that domain name.
You do need outcome and it translates it into this IP address which is a string of numbers and dots
.
This is a unique identifier.
Once we have that then we actually send a letter to when we actually make the request.
So in this case when I hit enter I am figuring out where my computer computers figuring out what does
that mean to me Dotcom's IP address.
OK.
We have the IP address now but send a request asking for the course's page.
So we make a request with an HTP request we'll talk a lot more about what that is and what they look
like.
And remember it's not just a one way direct shot there.
Basically the request bounces around from server to server until we get to the server we're looking
for.
So when we get to the server the first part is that the server is going to figure out what am I asking
for and my asking for the home page I'm asking for Slash courses page we're asking for the sign up page
the become an instructor page.
There's all sorts of different pieces here that I could be asking for and they're all different.
So the service job is to figure out what to send back.
When we do back in development that will be your job figuring out what content to send back.
So then the server often interacts with the database that pulls out information and it makes the combination
of each team l javascript and C S S.
So then our server responds back sends us this combination of each team s and Javascript it's a bunch
of code.
It's not very readable for humans in our browser steps in.
And it turns it into this it's the whole job our browser takes that information and it makes it easy
to understand for humans.
So this process happens on every single page of is it.
And you can actually see the underlying H.M.S. assess on any page and Javascript.
So there's a few ways of doing it in Chrome.
And this is why we're all using Chrome.
You can go.
Let's go to this page here.
I can right click and click View page source and it opens up a new window that actually contains all
of the H.M.S. s s and javascript that is the underlying source for this page.
Same thing on YouTube right click View page source.
And so this is on every single site.
So there's no way to hide this.
The whole Java the browser takes this.
And it turned it into this.
So browsers are definitely complicated things.
The good thing is you don't have to know how that works the browser.
That's the whole drop her browser.
It takes that code and it turns it into this.
So another way you can do it.
There's a shortcut in Chrome you can do a command option view on a PC.
I believe it's control option you if not you can just right click and chrome and view it as well