Unit 4

Lesson 8 - The Application Layer

   Common Application Layer Programs

Application Layer services are often different from user applications we typically work with. A user application may provide an easy-to-use interface to an unseen process that operates in the Application Layer. Because the user application uses the services of the Application Layer, the user application logically functions above the OSI protocol stack.

However, user application programs may also use their own protocols to communicate across a network, without using the services of the Application Layer. In that case, the OSI Application Layer process simply passes that information from the user application to the Presentation Layer, without modifying or encapsulating the information.

The Application Layer includes many programs and processes. The most commonly used examples are:

E-mail

USENET newsgroups

File transfer and access

Virtual terminals

Web browsers and servers

E-mail

E-mail is perhaps the most visible application on many networks. Its primary benefit is very fast delivery of messages. If the sender and recipient are on the same network, an e-mail message can be delivered almost instantaneously.

One of the most widely used e-mail protocols is Simple Mail Transfer Protocol (SMTP). SMTP defines a protocol, and set of processes that use the protocol, to transfer e-mail messages between users' mailboxes on e-mail servers. Unlike other communication protocols that use binary codes in structured fields, SMTP uses plain English headers. It does not define the programs used to store and retrieve mail messages. Although a basic mail "reader" program is included with virtually every OS, many different mail readers have been developed to provide a user-friendly front end to SMTP.

USENET Newsgroups

USENET is a widely used bulletin-board discussion system that predates the Internet, although its traffic is now carried over the Internet. A newsgroup is a file of e-mail messages relating to a certain topic. Some organizations set up public newsgroups to serve as online users' groups. However, others install news server software on their private servers, to create privately operated newsgroups.

The thousands of public USENET discussion groups are hierarchically organized, branching from seven fundamental categories (comp, misc, news, rec, sci, soc, and talk). For example, one USENET newsgroup, called "comp.databases," focuses on databases.

We access USENET through a special news reading program. The program initially notifies you of the groups available and lets you choose the groups to which you wish to subscribe. The news reader then notifies you of new messages in your subscription groups and keeps track of which messages in those groups you have read.

Each USENET site, or news server, maintains a copy of each of the newsgroups to which there are subscribers at that site. New messages for each group are copied from site to site by simply sending them as e-mail messages. For example, if someone posts a new message, that message is first put into the copy of the group at the subscriber's site. The message is forwarded from site to site until, in a short while, it has spread around the world.

USENET can be considered to be a layer on top of e-mail, because it uses SMTP to forward postings between servers. SMTP was designed to accommodate both news and e-mail. However, news reader applications use the Network News Transfer Protocol (NNTP) to post and retrieve messages from news servers.

File Transfer and Access

Two data manipulation capabilities are universally required by network users:

File transfer is the ability to copy a file from one node to another. File transfer is straightforward: the user issues commands specifying the source and destination, and the file transfer facility creates a copy of the file on the target node, leaving the original intact. In some cases, the data might need to be transformed if the source and destination nodes run different OSs. In the OSI model, this is handled by the Presentation Layer. However, individual applications can also take care of any transformation between nodes.

The File Transfer Protocol (FTP) process is widely used to transfer files between two computers. UNIX systems also provide a widely used program called UNIX-to-UNIX Copy Program (UUCP). UUCP uses its own special purpose protocol to copy files from one UNIX system to another.

File sharing, or remote file access, allows more than one user to access a file that resides on another node. File sharing is more complex than file transfer, because it is necessary to maintain only one copy of the file. When a remote node accesses a file to change it, the file, or at least the relevant portion of the file, must be locked. Locking prevents multiple programs from changing the same data simultaneously, because each node could undo the changes made by the other nodes. It is difficult to provide file sharing while preserving the integrity of the files and addressing possible network interruptions.

A virtual filestore is a file system that uses file sharing protocols. Virtual filestores allow the user of a node, as well as application programs that run on the node, to view the shared file as an extension of the file system on that node. The shared file looks and behaves as if it were local, except for differences in the data access speed. However, transfer of data across a network is always much slower than transfer of data from a local disk.

A virtual filestore is a file system that implements file sharing as described above in such a way that, to both the user and application programs, the remote file appears to be resident on the node. Sun Microsystems' Network File System (NFS) is a commonly used virtual filestore system.

Virtual Terminals

A terminal is essentially a display monitor and keyboard used for input to and output from a mainframe computer. It is often called a "dumb" terminal because it has little or no software of its own, and is the slave to the master mainframe. Commonly used terminals included the IBM 3270 and the DEC VT-100.

However, no standard existed for terminal equipment. Terminals made by different companies require different control codes in the input streams that are sent to them in order to produce a desired result. (Even different models from the same vendor can require different codes.) Thus, an application program must generate different control codes for each type of terminal it must use.

As networks developed, many different terminals were in use. To avoid incompatibilities between applications and terminals, the concept of the virtual terminal was developed. Virtual terminal protocols provide an abstract definition of a "generic" terminal that combines all of the common features of most real terminals, but leaves out any vendor-specific features.

Application programs are written to generate control codes for the virtual terminal. A software driver is then written for each type of actual terminal hardware, to translate the standard virtual terminal codes into the codes required by that hardware. If the application needs to take advantage of any unique hardware on a given terminal, it must "escape" the virtual terminal protocol to issue the special commands. However, it then risks becoming incompatible with other terminal types.

The most commonly used virtual terminal is the Telnet program. The IBM 3270 protocol has also become a de facto virtual terminal protocol.

However, a virtual terminal protocol is not the same as a terminal emulator program. A terminal emulator program is an application that allows a computer, typically a PC, to emulate a terminal by mimicking the protocol of the terminal. For example, a program called "tn3270" makes an Intel-based PC appear to the network to be a specific model of an IBM 3270-display device. Confusion between terminal emulators and virtual terminal protocols arises because terminal emulators can emulate virtual terminals. For example, programs are available for the PC and Macintosh that make them appear to be Telnet terminals. As a result, the term "Telnet" is used loosely to mean the emulator program rather than the protocol.

Web Browsers and Servers

The mid-1990s marked the dawn of a new era for the Internet: the Web. What once was the domain of command-line tools and UNIX servers became the world of the Web browser. Due in large part to the graphical user interface (GUI) of desktop computers, the ease of use and popularity of the Internet has increased dramatically. Web browsers have become one of the most popular applications in use today.

A Web browser, such as Netscape Communicator or Microsoft Internet Explorer, is a client application that allows a user to retrieve documents from a remote host computer called an "HTTP server" or Web server. As shown on the Web Browser and Server Diagram, the browser application uses HTTP (an Application Layer protocol) to request a Web page from a Web server. The Web browser's main job is to display Hypertext Markup Language (HTML) documents retrieved from HTTP servers. HTML is a text-based formatting language used to generically format text. The Web browser reads the document and displays it as indicated by both the HTML formatting code and the user's display preferences stored in the browser. Because the instructions for displaying HTML documents are built into the browser, Web page documents are generally fairly small in size.

Web Browser and Server

Web Browser and Server

The Web server's job is to respond to browser requests by transmitting Web pages. HTTP server applications can handle millions of requests per hour (if the hardware is powerful enough), because each connection is "stateless." This means that every time a client browser wants to retrieve a document, it sends a separate request to the server. To the server, each request is a unique event, unrelated to any other request. Thus, if a user spends several hours reading a particular Web page, the server has no knowledge of it.

In a typical session between a Web browser and server, the following actions take place:

The Web browser sends a connection request to the HTTP server.

The HTTP server accepts the request and notifies the browser of the successful connection.

The browser transmits the document request to the server.

The server retrieves the document and transmits its contents to the browser.

The browser receives the incoming document data and displays it for the user.

After the server has transmitted the entire document, it breaks the connection with the browser.

Note that in this example there are actually two processes at work. The application protocol (HTTP) transfers information (HTML) between the Web server and Web browser. The browser application provides the user interface, and displays the retrieved HTML document.

Real Audio Clip

Why have web browsers become such popular Application Layer protocols?

   Activities

See the Activities and Extended Activities section in Unit 4 Lesson 8 in your textbook Introduction to Networking to test what you have learned so far.

LAB
Click the icon to link to the How Numbering Systems are Used in Networking lab.

[ Previous Section ] [ Unit Contents ] [ Summary ]