Introduction
- History
- Basic Internet Concepts
- World Wide Web
- HTTP
- Web Applications
Internet
- A global network of networks through which computers communicate
- Envisioned by its inventors to serve as
- World-wide broadcasting medium
- Mechanism for information dissemination
- Medium for global collaboration
- Came to public attention only 25 years after its inception with the
- Introduction of web browsers
- Commercial use and "dot-com" revolution
- Now more than 100 million hosts (unique domain names)
History of the Internet
![]()
History of the Web
- Vannevar Bush envisions the Memex in 1945
- Ted Nelson introduces the term "hypertext" in 1965
- Tim Berners-Lee invents the Web (HTML and HTTP) in 1989
- Netscape releases the first commercial browser in 1994
- W3C begins work on eXtensible Markup Language (XML) in 1997
Hosts
- A host is a computing device connected to the Internet (PC, Internet appliance, mobile phone)
- Sends and receives packets
- Every host constantly monitors the network for packets
- Collision detection with retry
Internet Protocol (IP)
- The protocol (a set of conventions) that governs how packets are sent across the Internet
- Defines a format for assigning addresses to hosts
- A mechanism for transmitting packets between source and destination
IP Addresses
- Host addresses are 4 bytes long
- Assigned by Internet Assigned Numbers Authority (IANA)
- Usually presented in dotted decimal notation
134.117.5.8
Domain Names
- The dotted decimal notation is not very memorable
- On top, IP address often change for any number of reasons, and should not be hardcoded
- Symbolic names provide an alternative way of naming hosts
www.scs.carleton.ca- Given a domain name, how do we resolve it to its IP address?
- Domain Name Server (DNS)
Domain Name Server (DNS)
- A DNS is a federated database
- Each domain has a unique name, and each of the subdomains in a domain
![]()
Ports
- Every host has multiple ports (ako mailboxes) on which it can receive packets
- Certain ports (0-1024) are reserved for standard services
Reserved Ports
- 20: File Transfer Protocol (FTP)
- 22: Secure Shell (SSH)
- 23: Telnet
- 25: Simple Mail Transfer Protocol (SMTP)
- 80: Hypertext Transfer Protocol (HTTP)
Client-Server Architecture
- The Web has a client-server architecture with three fundamental components
- Web (client) browsers
- Network
- Web servers
![]()
Resources
- Anything accessible via the Web is referred to as a resource
- HTML documents
- Images
- Static resources don't change from request to request, such as an HTML document or an image
- Dynamic resources may vary with each request, depending on a number of conditions
- Changing data source
- User identity
- Input from the user passed with the request
- Time of day
Uniform Resource Locators (URLs)
- Standard way to locate resources on the Web
- Web equivalent for specifying a name in a file system
- An URL identifies the protocol (or scheme), host, optional port number, and document path.
- Common protocols include: http, https, ftp, and file
- Host identifies the machine running the web server
- Host and port number are separated by a colon (80 is used as default for http URLs)
- Path is the location of the resource requested
![]()
HTTP
- HyperText Transfer Protocol
- Implements a request-response model
- Connectionless (at least, before the current version, HTTP/1.1)
- As soon as a request is processed, the connection between client and server is terminated
- Defines format for requests and responses
A Sample HTTP Request
- At a minimum, a request includes
- Type of request
- Resource requested
- Name of server
- The following request is of type GET
- It asks the server for the resource /index.html
GET /~weiss/courses/205/index.html HTTP/1.0 Host: www.scs.carleton.ca
Sample HTTP Response
- This is a sample response the client browser would receive
HTTP/1.0 200 OK Date: Sun, 06 Jan 2002 10:05:30 GMT Server: Apache/1.2.13 (Linux) Last-Modified: Thu, 03 Jan 2002 20:14:26 GMT Content-Length: 2523 Content-Type: text/html <html> <head> <title>95.205/95/245 - Internet Applications</title> ...
MIME
- Multipurpose Internet Mail Extensions
- A specification for formatting non-text messages (graphics, audio, and video files) so they can be sent over the Internet
- Originally developed for formatting e-mail messages
- Many predefined MIME types
- text/html for HTML documents
- image/gif for image/gif for graphics
- application/pdf for PDF files
- Browsers can specify helper applications (plug-ins or external applications) to handle unsupported MIME types
Internet Applications
- Internet (or web) applications are online applications that users can access via web browsers
- Distinct from web sites that only serve static content
- Internet applications operate in background when you
- Fill out an online registration form (writing your registration information to a database)
- Make an online purchase (validating your credit card, logging the transaction)
- Request a stock chart for a given time range (dynamically generating the image)
- Use enabling technologies such as CGI, PHP, ASP, or Java servlets to create dynamic content
How Does an Internet Application Work?
- When the web server gets a CGI request, it executes the application in a separate process
- The server passes the parameters received with the request (if any) to the application and collects its output
- This output is then returned to the client just as if it had been fetched from a static document
![]()
Time Server
- The following Internet application is implemented in Perl
- It computes the local time on the web server and returns the result to the browser
#!/usr/bin/perl use strict; my $time = localtime; print "Content-Type: text/html\n\n"; print "The current time on this server is: $time";- It produces the following output:
The current time on this server is: Sat Jan 6 21:58:25 2001