CS 100 (Learn)CS 100 (Web)Module 03


Network Organization

(direct YouTube link)

NOTE: If your internet access is restricted and you do not have access to YouTube, we have provided alternate video links.

TRANSCRIPT

Note: This video transcript has been slightly modified. Significant corrections are marked with strikethrough, and alternative wording has been placed in [square brackets] to correct some of the awkward or confusing phrasing in the videos.

In this section, we are going to introduce a computer network and discuss how different computers can communicate over [a] network.

For this course, a network is going to be all of the "stuff" that connects computers and devices and allow them to communicate [with] each other.

There is lots of "stuff" that goes into a network and we are going to discuss some of that stuff. You can also think of it as the infrastructure behind all the connectivity.

When most people think of [a] network, they think of the internet... that is obviously the biggest computer network in the world, which is going to dominate our society for many years to come.

The web, or the "World Wide Web" [(WWW)] is the biggest piece of the internet puzzle.

But the internet is more than just the world wide web, and we'll discuss that briefly at the end of this section.

Before we get started, we're going to have a basic conversation about communication. We're going to talk about a non-computer use of communication first, to make sure that we understand what we mean when we discuss communication.

Synchronous vs. Asynchronous

The first topic that I want to discuss is synchronous versus asynchronous communication.

You probably haven't given much thought to this, but synchronous communication happens in "real time": a good example might be a conversation you have with your friend [in person], or maybe a television being broadcast over regular airwaves or a radio station. There are other types of synchronous communication devices: walkie talkies, old telephones [and similar devices].

Alternatively, there is asynchronous communication, and the example I'm going to use

The alternative to synchronous communication is asynchronous communication.

The example I'm going to use here [is] postcards. Now hopefully, you're listening to this video in a world where we still have mail systems and you understand what a postcard is. But in case you haven't, [and you] are unfamiliar with the concept of what a postcard is: you write someone's address and a little message [on the postcard]. [Then] you put on a stamp and put it in a physical mailbox. [It then] gets delivered to your friend somewhere else in the world.

When postcards are actually sent could be weeks, days, months apart.

What you [often] do is write on the postcard what day you sent it. [For example,] "July 22, 2017... Hi... How are you?". The idea is that you put a timestamp on the message and then send it off to your friend.

This is an example of asynchronous communication. You can still be communicating at the same time. He may be sending you a postcard and you may be sending them a postcard [at the same time], but how they are delivered and when they are chosen to be sent is not done on a particular schedule.

This is called asynchronous communication. Asynchronous communication is actually how all of the internet works. You may be using a real-time chat like skype or some other [application such as] google talk where you're talking to your friends and it appears like it's real time, but behind the scenes it's actually more like the postcard model. We're going to talk about this later.

All of the internet communication is asynchronous communication. Just like [when you] text your friends. [It] may seem like you're texting [synchronously] in real time, but the timing (and all the information for that text) is actually bundled in with your text. When you say "Hello, Bob... how are you?" in your text message, the text message embeds in it the timestamp for when Bob sent you actually sent Bob that message.

That is usually an indicator of when asynchronous communication is being used. As soon as you put a time on it, like the date on a postcard or the timestamp for a text, [it] indicates that it's asynchronous communication.

Real-time communication on the internet appears synchronous, but behind the scenes it's actually asynchronous.

Communication Layers

The majority of the [content] in this module is actually about different layers of communication. I'm going to explain what I mean by layers of communication (again using a non-computer example).

When we talk about communication we're often talking about messages. When a message arrives (or it comes "in"), it goes from low layers of communication to high layers of communication. Conversely, when you want to send a message, you go from high layers of communication down to low layers of communication.

What I'm going to do is show you a concrete example of what I mean by this, because it'll really help clarify [the layered communicaiton model].

What I'm going to do is walk you through an example of an incoming message from its source to its destination. Consider the [following] example: we're going to say "hello" to your friend, but there's a lot happening that you may not appreciate.

For you to say "hello", you push air from your lungs and that interacts with your vocal cords and other parts of your body like your lips and your teeth. If you don't believe me, try saying a sentence without using your lips and your teeth. Go ahead, I'll wait right now... it's pretty hard to talk without using your lips and your teeth. All of these things are working in conjunction to produce a sound wave.

A sound wave is actually force exerted on air molecules. When you talk, you're vibrating air molecules in the air and that is what's carrying your voice to your friend.

When you say "hello", all [of the following] is happening: [air] comes up through your lungs, through your mouth and your teeth, [which] then vibrates the air around you. The air molecules [vibrate] and [they] eventually reach your friend's ear.

[The air then] goes into their ear canal and starts vibrating all those little yucky parts of your ear that I don't like to think about because it grosses me out. You probably learned when you were a little child that there [are] a bunch of moving parts in your ear, [which] stimulate a nerve and that nerve goes to your brain and then your brain interprets those vibrations as frequencies.

If you've ever seen a display of music where you see frequency bars going up and down, that's how your brain processes that audio signal. Then your brain [deconstructs] those frequencies into something called phonemes. Phonemes are little pieces of sound bytes that you recognize.

For "hello", it might be "hah eh ll ohh". Every word is made up of a sequence of phonemes. Your [friend's brain can] put all [of] those phonemes together and recognize that you said the word "hello".

But there [are] even higher layers than that, because when you hear the word "hello" it actually means something to you... it's not just gibberish. It means someone is greeting you, and you now have a higher level understanding that this person is trying to greet you.

We could go [to] even higher levels because the way (or the nuance of the way) they said hello might be meaningful. You might be bumping into your ex-boyfriend at a party and he goes "hello..." and that might mean something [different] than someone [saying] "helloooooo" or spoofing something.

There's an actual semantic meaning on top of just the words. What I'm showing you right now is that there are multiple layers in communication. When [the message] came in it was at a very low layer:

All of this is happening whenever you hear someone saying just a simple word like "hello".

Communication is really quite amazing: it's going through all of these steps, all the time... whenever you're communicating. Of course, this is just a model of how communication happens in the real world, but it's very useful.

When you communicate in the real world, I want you to think about how this is all happening.

Let's go in the reverse order: when you send a message you go from a very high layer [to a lower layer].

In your brain, you think "oh, I want to greet someone... what should I say? Oh, I'm going to pick the word hello". Okay, so then now that you've decided [on] "hello", you're going to have brain impulses that go down to your lungs and your mouth and your teeth that make you actually say the word "hello" through those phonemes sounds. Eventually those phonemes come out of your mouth and vibrate the air molecules, and it's right back down to the lowest layer.

When you have an incoming message it starts at a low layer and then goes all the way up to the high layer where you can actually interpret it and understand it. Conversely when you're sending out a message, it goes from the highest layer all the way down to the lowest layer.

Now in practice, just to make [our model simpler], we can collapse many of those layers down. Let's simplify our model and say that when you're having a voice conversation, the [layers are] going to be:

  1. sound waves, and [then] that gets reconstructed into
  2. phonemes... which then become
  3. words, and then you have the
  4. semantic meaning of the words (the actual understanding what those words mean).

This is how a regular vocal conversation happens.

Let's go back to the example I mentioned before where we're talking about postcards and you want to send your friend a message on a postcard. Well, that too has several layers of communication.

When your friend receives a [message on] postcard from you, [the layers are]:

  1. [mail delivery system:] a physical postcard in the mail, and then the
  2. letters on the postcard, [which combine into]
  3. words, and then the
  4. [sematic] meaning of those words.

The same sort of layers of communication are happening.

The physical medium though, is different: instead of air molecules and phonemes that happen with spoken words, we get the mail delivery system and letters on the postcard.

What's interesting is [that] the higher layers are the same. If you want to say "hello" you can write it on a piece of paper and give it to your friend or you can say hello but the semantic meaning of what's actually happening is the same.

Human communication is very complicated. I'm not going to get into the nuances of body language and all these other things that's come into it... obviously we can have a long discussion about that and that's not what I want to talk about.

What I want to talk about is this model of how we move from low layers to high layers and that multiple messages can be sent in different ways and actually have different lower layers but at the higher layers they actually mean the same thing.

Protocols

The final concept I want to get through in this video is the concept of protocols. The main example I want you to think about is a handshake protocol.

You're greeting someone, so you reach out your hand and they see that and they go "oh, this person wants to shake hands with me", so they reach out their hands and then you cross hands, and move [them] up and down and then you let go. If you're a member of a fraternity, a sorority or some [other] secret club you may have a secret handshake (or something like that) but you have the basic idea. This is how the [handshake] protocol works when someone holds out their hand and wants to greet you.

In verbal communication, there [are] other protocols: don't speak too loudly, don't speak too quietly, don't stand too close to someone else. All [of these] things [are part of the] normal protocols of everyday speech.

For a postcard, there [are] very specific protocols. You need a stamp, the stamp has to be a valid stamp (you can't just draw the stamp). You need an address: you can't just say I want to send a message to "Bob in Toronto": that will not get delivered properly. You need to give a specific address and a postal code and you have to put them in specific spots on the postcard, and this is all part of the protocol for how to send a postcard.

As it turns out, every layer of communication has some protocols: some are more strict than others, some are more complicated, some are very basic... but every layer has a protocol and that is how the communication actually happens.

Later on, I'm going to mention some computer protocols and the best way to think about a computer protocol is a form. [For example, when] you go to the doctor and they want you to fill out a form: are you allergic to penicillin? are you contagious? have you contracted any diseases or been to any farms?

All these forms that you must fill out when you go to the doctor or travel to a different country... that is a protocol: you are filling out the form and filling out your name in a certain spot and checking certain boxes. [These are the] types of protocols that actually happen quite frequently with computer communication.

Filling out a form and putting the right [information] in the right [position] and then passing that form on to somebody else... all of that really is very similar to a handshake: you reach out your hand, the other person knows where to put their hand. Sometimes people screw it up, but for most people they can shake hands without any miscommunication.

That is an example of a protocol.