Applied Systems Programming

Class Notes
Text: Programming the World Wide Web, 2nd Edition (Sebesta)
Dr. Tim Margush – University of Akron – © 2003

Chapter 1 - Fundamentals of the Internet

History of the Internet

1969 UCLA became the first node on ARPANET (created by the Department of Defense) At the end of 1969, there were 4 hosts on this network.

Other networks: BITNET, CSNET, USENET, SPAN, among others

1984-5 NSFNET (and JANET in Britian) announced an initiative to create an “open” network to serve the entire higher education community (many earlier networks were designed for a limited collection of users)

NSFNET originally connected 5 super computer centers, but became the backbone for the Internet. In 1992, over 1 million computers were connected to the Internet.

NSFNET required the use of TCP/IP (Transmission Control Protocol/Internet Protocol) as the method for passing information between nodes.

1989-1991 development of the World Wide Web – client (browser) server (www server) technology using the Internet as the medium.

1993 MOSAIC, the first “browser” was publicly available from NCSA. They also released a free web server httpd.

Internet – collection of computer systems and the basic protocols for intersystem communication

WWW – collection of documents and retrieval methods utilizing client-server technologies.

IP Address – 32bit number (address) assigned to each node of the Internet

Arranged as a sequence of 4 bytes: eg 130.101.5.4 (University of Akron)

Actually, these addresses are in 2 parts network/host – the division point depends on the class of the address:

Class A - supports 16 million hosts on each of 127 networks (0.x.x.x to 127.x.x.x)

Class B - supports 65,000 hosts on each of 16,000 networks  (128.0.x.x to 191.255.x.x) The University of Akron has 130.101.x.x Class B address

Class C - supports 254 hosts on each of 2 million networks  (192.0.0.x to 223.255.255.x)

The first part of an IP address determines its class… 127 is reserved for local (loopback) tests

An IP Index may be found at http://flumps.org/ip/index.html

Domain Names (www.uakron.edu) are text versions of IP addresses. Domain Name Servers make the translations. The last part is the top-level domain (usually .edu, .org, .com, .net, or a country id such as .jp or .uk). The middle section is the domain (such as uakron) and the first part the actual host (machine) – such as www or vonneumann.

Ports – Each node identified by IP address has 65536 ports. TCP/IP messages are directed from a port to a port (using a particular communications protocol). Servers are programs running on a host that “listen” to one or more ports.

Common port assignments:

Service             port
ftp        21
telnet   23
gopher 70
http      80
nntp     119
wais    210

URL – Uniform Resource Locator – protocol:location

http://www.cs.uakron.edu:80/~margush/index.html

Partial URLs omit the host and assume the rest from the context of the URL.

Other URL protocols: file, ftp, gopher, telnet, mailto, news, and wais

Protocols (developed by the mid 80’s) telnet, ftp, gopher, smtp, nntp, wais,  …

WWW servers often modify the path relative to a root directory. They also react differently when a directory or executable file is the resource.

MIME (Multipurpose Internet Mail Extensions) is part of the http protocol. WWW servers attach a MIME type to all returned resources. The browser reacts differently to different types.

Servers determine MIME types from the file system – for example by the file’s extension.

.gif            image/gif
.jpg image/jpeg
.ps application/postscript
.html text/html
.txt text/plain

Browsers display some of these internally. Others require external applications for proper display.

HTTP Protocol:

Request:
Get www.cs.uakron.edu/~margush/index.html
accept text/plain, text/html, image/gif
(blank line)

Response:

HTTP/1.1 200 OK
Date: Tue, 15 Jan 2002 19:07:21 GMT
Server: Apache/1.3.14 (Unix)
Last-Modified: Mon, 24 Sep 2001 15:02:40 GMT
ETag: "3187-153-3baf4b10"
Accept-Ranges: bytes
Content-Length: 339
Connection: close
Content-Type: text/html
 

<HTML>
<HEAD>
<TITLE>University of Akron Computer Science</TITLE>
</HEAD>
<FRAMESET COLS = "20%,*">
        <FRAME NAME = "left" SRC = "left.html" FRAMEBORDER = "no" 
               MARGINHEIGHT = "0" MARGINWIDTH = "0">
        <FRAME NAME = "right" SRC = "right.html" FRAMEBORDER = "no" 
               MARGINHEIGHT = "0" MARGINWIDTH = "0">
</FRAMESET>
</HTML>