Video presentation: Computer Networks and the Internet.
2.1 Principles of the Application Layer; ap...
Video Transcript:
[Music] welcome to the application layer in a top-down approach the application layer it's really where it all begins as the french would say it's the raison d'etre the reason for the existence of the network in the first place the applications that the network's going to support and we'll find that for our studies it's also a really good place to begin we'll start with applications that we're mostly familiar with in our everyday use of the internet and we'll see that application level protocols like http the hypertext transfer protocol are really very human readable and very natural for us to understand and so the application layer is a great place for us to start our study of networking our goal in this chapter is going to be to learn about both the conceptual and the practical implementation aspects of the network layer we'll start by looking at the services that are provided by the underlying transport protocol right below the application layer because anything the application layer does can only be done by using the services of the transport layer and we'll look at two forms of interaction between the pieces of an application layer application and that is peer-to-peer interaction and the so-called client server model that's been around a lot longer and of course we'll learn about protocols by looking at popular internet application layer protocols and infrastructure we'll take a look at http the hypertext transfer protocol that operates between a web client and a web server we'll also take a look very quickly at smtp the simple mail transfer protocol for email we'll spend some time looking at the domain name system the dns which is used to translate from names like gaia. cs. umass.
edu to 32-bit ip addresses like 128. 119. 40.
186 and we'll take a look at distributed application level infrastructure like video streaming systems and content distribution networks and we'll wrap up here by looking at the application programming interface the socket api as internet users we're all familiar with many many network applications from social media to the web to messaging email multiplayer games streaming audio and video teleconferencing applications like zoom internet search and remote login and what's really interesting to me is that all of these applications maybe except for email and remote login were developed long after the internet architecture the layers that we learned about in section 1. 7 the transport layer abstractions that we'll learn about today were defined that's pretty amazing one might say that the internet designers got it right since the network they invented supports applications they hadn't even dreamed of at the time and i want to play you here a short clip from an interview with vint cerf one of the fathers of the internet as we learned in section 1. 7 that notes that the internet architects maybe knew a few likely internet applications but certainly not all of the applications that we've seen he talks about the arrival of new applications about layering she learned about in section 1.
5 about the importance of abstractions and about getting an appropriate stable api all of which we'll be covering here so i think you'll enjoy this interview did you imagine at the time that it would have the ramifications and implications that we're seeing today you know the the simple answer of course would be no but it's not true that's not not a fair answer if you think about this a little bit first of all remember that the arbanet project the predecessor had already encountered electronic mail a guy named ray tomlinson at bbn bolt baroneck and newman realized that he could do networked electronic mail if he just forwarded the messages through the network and got them to go to the right target machine and then he had to figure out okay i get to the right machine how do i tell it which user it is that i am supposed to be sending this message for and he needed to separate the machine identity from the user identity and the only character he could find on the on the keyboard that wasn't already in use by the operating systems was the at sign and so it's kind of natural user at host so that's the origin of the at sign in our email so he does he does this and demonstrates it in sort of mid-1971 everybody gets excited about this we all realize what a powerful tool this is it's it's computer-mediated communication we no longer have to both be awake at the same time to communicate so we can overcome time zones and everything else and so email was already in place before internet work was even started so that's a long way of saying that we actually had some appreciation for what this technology could do and we used it to do a lot of the applications that we still use today electronic mail file transfer remote access to time shared machines but of course the most significant change after the internet finally gets operational in early 83 and then becomes commercially available in 1989 is tim berners-lee's development of the world wide web and to be honest tim releases this out of cern in geneva in sort of december of 1991 nobody notices except for a couple of guys at the national center for supercomputer applications mark andreessen and eric bina who say oh this is cool why don't we build a graphical user interface so they develop the mosaic browser they release this it makes the internet look like a magazine with formatted text and images and eventually you know audio video and things like that everybody notices uh and so uh the this introduction of this new way of sharing information on that had a profound impact on its accessibility and utility what we had achieved is this infrastructure that was infinitely well not really but largely expandable it dropped the barriers to access to computer communication to as close to zero as possible we had given away the design of the internet for free with no uh patents or any other constraints deliberately in order to stimulate adoption and use so as the general public encounters the world wide web they have the ability to inject content into the network with very little barrier and of course to get access to that information in fact there was such an avalanche of content that flowed in that we now couldn't find anything and we needed search engines so we got things like alta vista and yahoo and eventually google bing and so on so this this question of did we know what was going to happen no but there were milestones in the course of the evolution that signaled that this was going to be a big deal and it was the commercialization in 1989 of the service as opposed to commercialization of the equipment like packet switches from cisco systems or proteon or others it was the commercialization of the service and the arrival of the world wide web that really conflated these two things then there's one other thing which i think was equally significant and that's the arrival of the smartphone in 2007 this is steve jobs and apple and at that point you see a phenomenon which is very important to understand two technologies that are mutually reinforcing the mobile phone makes the internet more accessible the internet makes the mobile phone more useful because of all the content and functionality that's on the net and so those two things together have really colored the last decade of the evolution of the internet and on the products and services that go with it and then the more apps that started appearing for exactly right yes because we have now we have a platform so the interesting thing about all of this is the layering that's going on the internet is a layered architecture tcp ip is the sort of the core layer tcp and the other real time protocols are just above that and then there are utility protocols like file transfer when we get to the world wide web it's another layer the hypertext transport protocol sits on top of tcp and then on top of the mobile phones we get apis that make it easy for people to build applications even if they have no idea how the mobile telephony part works and it's this isolation of knowledge of necessary knowledge and the stability of the interfaces whether it's a stable protocol interface or a stable api that the longevity and stability of those interfaces allow people to do things without having to know very much at all if anything about how this works underneath yeah so you create this opportunity for invention uh without a whole lot of overhead well now imagine that you want to write an application and actually we're going to write some networked applications in just a second so if you want to write a networked application what do you have to do we've seen how complicated the internet is think about all those things going on under the covers from source to a destination well as it turns out it's really pretty easy to write a networked application because in a way we can abstract away all of that complexity that's happening deep inside the network all we have to do is worry about two things first what are the services provided by the transport layer and secondly what is the api the application layer interface look like to these transport layer services now when we want to build a network application there are basically two styles of interaction that describe how the pieces of the network application are going to interact with each other the first is the client server model and the second is the peer-to-peer model and since the client server model's been around the longest and was the first let's take a look at that in the client server paradigm well there's a server and there's a client the server's an always-on host generally has a permanent ip address so that clients will know where to contact it and a server may be hosted in your home in your company in your university or in commercial data centers on the client side well that's what we're more familiar with clients are going to operate by contacting and communicating with a server clients will typically be intermittently connected to the internet for instance when your phone or your laptop is connected to the internet so they won't have a permanent ip address and most importantly clients do not communicate with each other instead they're going to interact with servers and the best example of a client server protocol one that we'll look at in detail is http where the client is the web browser and the server is the web server in a peer-to-peer architecture there is no server instead what we have are peers in systems that are going to directly communicate with each other they're going to request service from other peers and they're going to provide service in return to other peers we see that in file sharing as an example where a peer may request files from other peers but also serve files out to these other peers these peers are going to be intermittently connected to the internet and they're going to change their ip address and so with peers coming and going the management of these peers is going to be much more complex than in a client server environment so as we've seen network applications going to consist of a set of interacting pieces whether they interact in a client server model or they interact in a peer-to-peer model so it's not going to be a single stand-alone program that you program compile and run instead it's going to be multiple programs each of which you're going to write and compile and run now when these programs are running they're instantiated as a process so you can think of a process as the executing version of a program now so these processes are going to be communicating if they communicate with each other inside a single computer that's generally referred to as inter-process communication ipc when they're running on separate computers when they're running on separate hosts and devices they're going to have to communicate using messages and that's what we're going to be interested here so let's see how two processes each on different devices on different hosts are going to communicate with each other well we've talked a lot about the client server model and let's get even a little bit more precise with our language when we start talking about building and programming client server applications we're going to refer to the process that initiates communication that is first reaches out to the other side as the client and the process that is contacted as the server the application programming interface down to the transport layer uses an abstraction known as a socket processor is going to send and receive messages to and from sockets that it creates and you can think of a socket as being analysis to a door we create the door we send messages into the door and we receive messages back out of the door the sending and receiving process are going to rely on the underlying infrastructure the transport layer network layer and link layer to deliver messages from a socket at the sending process to a socket at the receiving process and it's important to note that there are going to be two sockets involved whenever a sender and receiver communicate one on each side of that communication now we can dive down into some of the mechanics of actually using a socket to communicate and the first topic we'll want to discuss is a addressing so think of it this way when you want to communicate with somebody you need some addressing information if you're sending them a letter you need to know the street address and the town they live in if they live in an apartment building you need the apartment number if you're calling somebody you need a phone number maybe you need a country code and you need a local area code and if they're in a company you also need to know some extension information and it's the same thing with communicating using a socket we need some information about how to address the messages that are going to the other end of the socket endpoint when we create a socket it's going to have two important pieces of information associated with it the first is the ip address of the host and the second is a port number as we'll see some port numbers are associated with a specific service and a specific protocol for example establishing a connection to a server on port 80 will connect you to the web server at that server connecting to port 25 will get you to an email server we'll cover ports in more detail throughout this chapter well way back in section 1.