Title: Week 2 Lecture
1DB3009N Week4 Part1 Background To The
Internet and WWW technologies
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
2The problem
- In the 1950s and 1960s computers where expensive.
Perhaps a company or university department could
afford one. The idea of a computer per employee
was a dream - By the 1970s there where enough computers in a
single company or university to make sharing data
between them useful. This lead to Local Area
Network technologies such as Ethernet, Token
Ring, Token Bus, Dec net and other technologies. - These technologies where limited to only
connecting tens or hundreds of machines together
with wires not more than some 100s of meters long
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
3The problem
- People wanted to share data between sites, cities
and countries but - All the local Area Network technologies where
- Short range only
- incompatible with each other.
- Physically connectors, wires
- Electrically what voltage for a 1 and a 0, speed
etc - Protocols how and when to talk to the network
- Addressing (names of machines)
- The challenge was to build a network of networks
The Internet
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
4The solution - Layers
- To try and connect up such a mess of independent
incompatible short distance products required a
structured approach which provides hardware
independent - delivery of messages
- names for networks and machines.
- The solution was to split the problem up into
layers, each layer relying on the standardised
services of the layer bellow and each layer
providing standardised services to the layer
above
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
5The Simplified Internet
Application (wants to send data between machines)
Still evolving e.g. HTTP SMTP SNMP TP TELNET
Standard format for data for email, file transfer
etc
get bytes from users program from one machine to
another (independent of application)
The internet TCP, UDP and IP
get groups bytes (PACKET) from between networks
(independent of hardware)
- get groups of bytes (FRAME) from A to B on a
single Network - (hardware dependant)
Existing Local Area Network technologies
get bits from onto a single network (hardware
dependant)
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
6The Internet
- The Internet is a network of local area networks.
- Connects millions of computers around the world
using various technologies including phone lines,
fibre optic lines, coaxial cable, satellites, and
wireless connections. (You could use carrier
pigeon) - Normally individual users at home do not connect
to the Internet directly instead you connect
through a Internet service provider (ISP) by
modem or ADSL etc. - Larger companies and colleges may be directly
connected to the internet - The internet provides many useful features such
as the ability to transfer files between
machines, remote login into machines and transfer
email as well as supporting the entire world wide
web. Even Microsoft's much advertised .NET is
just an extension to the internet. It does not
replace it. Only hide it!
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
7The Internet
Servers
Router
Clients
Network
Internet
Network
Network
Network
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
8Implementing the Internet
- The Internet is basically two layers over the
existing local area technology. - Internet Protocol (IP) provides addresses for
networks and machines, routes packets from the
source to the destination machine and can deliver
up to 64Kbytes in a packet. There is no error
recovery mechanism. You don't know if the packet
arrived or not. You also can't tell if the data
in the packet was damaged on route. There is no
security provided. The order packets are
delivered in is not guaranteed. Packets may
become duplicated - The next Layer up is basically two alternative
systems UDP and TCP - User Datagram Protocol provides addresses for
applications and the ability to communicate
between applications otherwise its like IP
cheap and cheerful - Transmission Control Protocol provides the
ability for an application to send almost
unlimited data. (it is split into IP packets and
the order adjusted if they arrive out of order.)
Its reliable. lost and damaged packets are resent
duplicates are discarded. Its slower and more
expensive than UDP. Easier to program. The world
wide web uses TCP
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
9Advantages of TCP/IP
- It works!
- TCP/IP provides the base on which other Internet
services depend. - The protocol is successful because of following
reasons - Efficient and general purpose it can support
many services - Flexible and robust it can be used with many
underlying communication technologies (e.g. with
Local Area Networks as well as Wide Area
Networks) - Its flexibility has allowed engineers to use
TCP/P with computers, networking technologies,
and services that did not exist when TCP/IP was
designed. - It withstood rapid growth of Internet since
1990s. - It is not been stolen or ruined by Microoft
(yet) - Microoft has no control over it
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
10Structuring the relationship between clients
- The designers of the internet decided not to
limit what applications or data could be
transferred or the role of the clients. - These models define the relationships between the
clients and their roles without defining the
clients, applications or the data
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
11Structuring the relationship Master-Slave
Networking
- In early days, computers were large and
expensive. Most companies could afford only a
single computer. Only one person could use the
machine at a time and they where very difficult
to use and program (no GUI often almost no
operating system and easy to break) - Later dumb terminals where connected to the
computer so that several users could login into
the machine at the same time and share it. This
required operating systems such as UNIX that
could multi task and were also multi user (No
windows Os is multi user) - The dumb terminals where completely controlled by
the main machine. This is master slave. - OBSOLETE relationship
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
12Structuring the relationship Distributed
Computing
- With the advent of mini computers, work stations
and later personal computers (PCs) computers
became so inexpensive groups or even individuals
could have one without the need to share via dumb
terminals. - In the master slave model data and service
sharing is implicit because all the data is
actually on a single machine. - With Distributed computing the sharing must be
implemented using network and possibly internet
technology because the data and users do not
share the same machine - The machines can act independently of each other
and share data when they need to. - The original goal of DS was to try to make the
illusion that everyone shared one giant machine
however, this has proven very very difficult to
achieve!
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
13Structuring the relationship Client-Server
Computing
- The goal of making all the machines look like
one machine is so difficult a simpler model
developed called client server - Servers provide services to clients. This role is
fluid. For instance a server may use the services
of another server. I.e. a server of one service
may be a client of another service - In general users becomes clients of the servers.
- For example. The user wants to send an email
- User writes an email on their machine using an
email client - Email client sends the email to the nearest email
server - That email server forwards the email to another
server and so on towards its destination
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
14Client-Server Computing Replicating the Service
- Since a server provides a service it makes sense
to not limit the system to serving a single
client at a time. Especially if each request
takes a long time or the service is popular. - This can be achieved by running multiple copies
of the service (replicas) of server programs in a
computer to permit multiple users to access the
service concurrently (simultaneously). - Server programs usually run on large computers
because they will receive concurrent requests and
it makes sense to spend money on the things that
get used a lot.
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
15Client-Server Computing Problems
- When the server computer crashes, clients will
not be able to send requests or receive results.
Often the client relies upon the service and
can't provide it itself... - Servers handle many requests and are expensive so
there is a tendency to add more clients (who
often pay) to increase efficiency but each client
will get a slower service - The client often has little control over what
happens after it submits a request to a server
for a service. - The service speed may vary at popular times it
will be slow and less popular times it will be
faster
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
16Client Server System Example DNS
- Each IP packet contains the source and
destination addresses of the two computers
involved in the communication - Space inside a packet is at a premium so instead
of using text addresses like webmail.londonmet.ac.
uk IP packets contain addresses consisting of 4
byte numbers. E.g. 192.12.21.7 - IP therefore needs a mechanism to translate text
names (domain names) into IP addresses. This is
done by the Directory Name Service DNS
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
17Client Server System Example DNS
- DNS names are organized into a tree. This is a
common computer since solution to handling lots
of information - DNS is a client server based system which is
distributed. - DNS data is spread between servers each one
looking after a domains like londonmet or a
larger domain like ac.uk - Because the data is spread out a server failure
will only affect a domain. - Servers may be replicated to increase performance
and reliability - Easier to manage since changes to a domain only
effect that domain server and not the others - Clients contact their local DNS server with a
domain name to look up and if the server knows
the address it returns the IP address to the
client. - If the local DNS server does not know the address
it passes the request to the DNS server above it.
This process is repeated until the address is
found or the request goes back to the root of the
tree. At the root of the tree the request is
passed down towards the branch of the tree that
contains the IP address of the machine
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
18Remote domain name server in France
Local domain name server in UK
1
2
3
4
Internet
Remote computer in France
Users computer in UK
1. Application asks local domain name server for
the IP address of a computer in France 2. UK
server does not know the answer and contacts the
remote server in France automatically 3. The
remote server uses DNS to obtain the IP address
and returns to UK server 4. UK server services
the request
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
19World Wide Web (WWW)
- The World Wide Web is the name given to the part
of the Internet that can accessed with the Web
browsers (e.g. Netscape). - It was invented by Tim Berners-Lee (English) of
CERN (The English also invented the first
mechanical (Charles Babbage) and first electronic
computers (ENIGMA)) - The Web consists of millions of web sites (e.g.
yahoo.com, microsoft.com, bbc.co.uk) comprising
billions of web pages linked to each other and
provides access to diverse and rich information
resources. - A web page is written in the markup language
HTML. A page may include many types of media
including text, graphics, animations, audios
videos etc. - Web pages are linked together using hyperlinks.
When a hyperlink is clicked on the web browser
loads the target page. - Links work even if the target page is on a
different machine from the source. - However, since the links contain the exact
location of he page, if the page moves the link
needs updating. There is no mechanism to
automatically perform this update - Modern web pages can be static (read from a file)
or dynamically created (requires a program to be
run to generate the page)
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
20Yet More Layering the WWW
- The world wide web is built on top of the
internet on top of the client server model. - The job of the WWW layer is to transfer a web
page from the web server to the web browser. - The web page is structured into HTML (Hyper Text
Modelling Language) - HTTP Hyper Text Transfer Protocol was established
to structure the transfer for HTML provide error
messages etc. - URLs Universal Resource Locators where created to
give each web page a name
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
21The Simplified WWW
Web browser wants a page from a web server
This is the World Wide Web
Pages structured into HTML and referenced via URLs
HTTP used to structure communication between
client and server
get bytes (in this case HTTP packets) from users
program from one machine to another
The internet TCP, UDP and IP
route groups of bytes (IP PACKET) between
networks (independent of hardware)
get groups of bytes (FRAME) from A to B on a
single Network (hardware dependant)
Existing network technologies
get bits from A to B on a single
network (hardware dependant)
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
22Web Browsers
- A browser is a Web application that uses HTTP
protocol to interact with the Web server. - It obtains files and data requested by the user
through the server from remote sites. - The location of the page is written as a URL
- It renders (formats and displays) text and
graphics in the browser window. - The look of the page is determined by the HTML
commands within the page - Some popular browsers
- Netscape
- Internet Explorer
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
23Uniform Resource Locator (URL)
- URL specifies the location of the page to be
obtained from a web server. The page is usually
displayed or some times simply downloaded as a
file onto local disk.
http//www.unl.ac.uk80/simt/index.html
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
24Hyper Text Transfer Protocol
- HTTP is the communication protocol (rules) built
on top of TCP IP to allow web servers and web
browsers to communicate together - HTPP has several interesting design decisions
which will have effects on the way we can program
web applications. - HTTP does not store any information between
requests! - Cannot get a history of client requests
- This makes programming a shopping basket
impossible because you can't remember what is in
it. - Cannot impose rules such as you must add items to
the basket before you checkout
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
25Hyper Text Transfer Protocol
- Why make HTTP stateless if it causes us so many
problems? - The designers originally intended web pages to be
read from files and not created on the fly by
programs so no history was needed - Error recovery is really simple just restart the
server there is no messy chains of requests to
complete - Makes programming the web server and web client
easier. - Many internet services (UNIX such as file
sharing) are stateless for these very reasons - Extensions to the web browsers and web servers
(sessions and cookies) gets around this problem
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
26HTTP Protocol Part 1
- Web page serving is a classic client server
system. - The client web browser opens a TCP connection
with the server specified in the URL the user
typed. - By default this connection initially connects to
port 80. (the client can use any port. The IP
packet will contain the clients port number so
the web server will know which port to send to) - TCP automatically creates a temporary port on the
web server for the rest of the conversation
leaving port 80 free for another client to
connect to...
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
27HTTP Protocol Part 2
- After the initial connect the client sends a URL
request for a single web page or item on a web
page to the web server - The web server sends the client the contents of
the page or item - If the web server can not find the item an error
message is returned instead - When the conversation is over the connection is
closed allowing the temporary port to be reused
if necessary - This type of communication is called request
response because the client sends a single
request and gets a single reply. - However, this is inefficient because a connection
has to be opened and closed for every page
fetched
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
28Hyper Text Transfer Protocol
- Client opens connection to server on a port 80
(TCP assigns a temporary port for the duration of
the conversation on the server) - Client sends request with URL identifying
resource required - Server sends the client the resource or an error
message - The client closes the connection and the
temporary port is de-allocated
Server machine
Client Machine
Port 80
1. Connection open
Port ????
Web Server application
Temporary Port
2. request
Web Server application
3. reply
4. close
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
29HTTP Get request
- GET /im269/w2.html HTTP/1.1
- Extra stuff like cookies
- (much more about these later)...
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
30HTTP Reply
HTTP/1.1 200 OK Server Apache/1.3.9
(Unix) Last-Modified Mon, 22 Sep 2003 012005
GMT Content-Length 3554 Content-Type
text/html lthtmlgt ltheadgtlttitlegt im269 Lecture
Notes lt/titlegtlt/headgt ltbodygt im269 Course
Contents. lt/bodygt lt/htmlgt
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)
31What you should have learnt
- Some idea of how the internet works
- Jobs of TCP, UDP, IP and DNS
- The importance of layers
- The details of how web pages are fetched
- Request reply protocol
- HTTP, limitations and order and meaning of
messages - Details of URLs
- Different Architectures
- Client Server
- Master Slave
- Distributed
- The Internet has nothing to do with Microoft at
all
CCTM Course material developed by James King
(james.king_at_londonmet.ac.uk)