ECE 4450:427/527 - Computer Networks Spring 2017 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 8: Application Layer Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 1
Network Applications write programs that run on (different) end systems communicate over network e.g., web server software communicates with browser software No need to write software for network-core devices network-core devices do not run user applications applications on end systems allows for rapid app development, propagation Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 2
Processes process: an instance of a program running within a host. within same host, two processes communicate using inter-process communication (defined by OS). processes in different hosts communicate by exchanging messages client process: process that initiates communication server process: process that waits to be contacted Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 3
process sends/receives messages to/from its socket socket analogous to door Sockets sending process: shoves message out its door sending process relies on transport infrastructure on other side of its door, which brings message to socket at receiving process When message arrives at the host, it passes through receiving's process door (socket); receiving process will act on message A software interface: Interface between application layer and transport layer host or server process socket TCP with buffers, variables controlled by app developer controlled by OS Internet host or server process socket TCP with buffers, variables Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 4
Addressing Processes: Ports Application processes communicate by exchanging messages across the network Web: a client browser process exchanges messages with a web server process. We need something to identify receiving and sending processes: Port numbers A web-server is identified by port 80 A mail server is identified by port 25 Port number is needed, since a host might run many network applications Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 5
Port Discovery Use well-publicized ports for different services DNS (Domain Name System) uses port 53 Email uses port 25 HTTP uses port 80 Use one port as a port-mapper service Call 411 to learn the port of any other process Allows for dynamic allocation of ports to different services Allows for the assignment of ports to newly created services Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 6
Applications Two of the most popular The World Wide Web and Email. Broadly speaking, both of these applications use the request/reply paradigm users send requests to servers, which then respond accordingly. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 7
Traditional Applications It is important to distinguish between application programs and application protocols. For example, the HyperText Transport Protocol (HTTP) is an application protocol that is used to retrieve Web pages from remote servers. There can be many different application programs that is, Web clients like Internet Explorer, Chrome, Firefox, and Safari that provide users with a different look and feel, but all of them use the same HTTP protocol to communicate with Web servers over the Internet. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 8
Applications Two very widely-used, standardized application protocols: SMTP: Simple Mail Transfer Protocol is used to exchange electronic mail. HTTP: HyperText Transport Protocol is used to communicate between Web browsers and Web servers. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 9
Web Services So far, we just talked about traditional applications: interactions between a human and machine There is an increasing demand for direct computerto-computer direction: Usually, come from business world Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 10
Example We order a book from Amazon Once book is shipped, we are able to track via Fedex.com But we are also able to track its directly from Amazon: Amazon needs to send a query to Fedex in the format Fedex understands, interpret the result, so that the result can be displayed Amazon and Fedex needs a protocol to exchange information Package Tracking Protocol Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 11
Web Services There are so many potential protocols of this type: We will have a new problem the Scale. It is not scale in the size of the network, but in the number of different kinds of applications We better to have some tools to simplify the task of specifying protocols and building them Two architectures have been advocated as solutions, both referred to as Web Services The name is so generic, many mistakenly assume it includes any sort of services associated with the Web. In fact, name is taken the term for the individual applications that offer a remotely-accessible service to client applications to form network applications. SOAP (Simple Object Access Protocol) & REST (Representational State Transfer) Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 12
More Materials 2.1 Principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail SMTP, POP3, IMAP 2.5 DNS 2.6 P2P applications 2.7 Socket programming with TCP 2.8 Socket programming with UDP Computer Networking: A Top Down Approach, 6 th edition, Chapter 2. By Jim Kurose, Keith Ross Addison-Wesley, April 2012. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 13