Title: Week 2
1Week 2
2Learning objectives
- Application architecture
- Overview
- Best practices
- Illustration The case of the WWW
- Architecture
- Messages, protocol and other components
- Application exercises
3Course overview
4Application architectures
- Application programs carry out four functions
- Data storage Storage and retrieval of data
- Data access logic Query required to access a
subset of data - Application logic Work performed by application
- Presentation logic User interface
- Three basic application architectures determine
how these functions are split between clients and
servers - Host-based architecture
- Client-based architecture
- Client-server architecture
- Application architecture
- Describes how application layer functions are
spread among computers to deliver service to
users - Not the same as network architecture which refers
to a network physical and logical topology
(hardware layer)
5Host-based architecture
- Very first application architecture to be
developed - The host, usually a mainframe, performs all 4
application program functions - The client, usually a terminal or a PC running a
terminal emulation program sends and receives
messages to and from host (See figure 2.1) - Limitations
- Overload on host side leads to increased response
time - Upgrades come in large increments and are
expensive
6Host-based architecture
7Client-based architecture
- AKA peer-to-peer architecture
- Became important in the late 1980s with the
widespread use of PCs and LANs - Server is a microcomputer responsible for data
storage - Client is a microcomputer responsible for the
data access, application and presentation logic
(See figure 2-2) - Limitations
- No access logic on server side All data must
travel to client for processing since queries are
performed by client - Overload the network circuits ? poor network
performance
8Client-based architecture
9Client/Server architecture
- Most common application architecture used in
todays networks - Server handles data storage and data access logic
- Client takes care of the presentation logic
- Application logic may reside on the client,
server or be split up between the two (see next
four slides) - Benefits
- Network performance processing is distributed
between client and server - Lower required capacity (less traffic)
- Middleware software allows softwares from
different vendors to be used together (softwares
that conform to the same standard can
"communicate" with each other without requiring
complex coding) - Comes in different versions See next slides
10Two-tier, three-tier and N-tier architectures
- ?Refers to ways the application logic is
partitioned in C/S architecture - 2-tier architecture (see Figure 2-3)
- 1 client, 1 server, application logic is
partitioned between the 2 - Most common architecture
- 3-tier architecture (see Figure 2-4)
- The client handles the presentation logic
- The application server handles the application
logic - The database server handles the data storage and
data access logic - N-tier architecture (see Figure 2-5)
- More than three sets of computers are used
- Benefits Easy access (if a web server is added)
and load balancing - Major limitation complexity
11Client/Server architecture(2-tier C/S
architecture)
12Three-tier architecture
13N-tier architecture
14Thin versus thick clients
- Refers to how much of the application logic
resides on the client - Little or no application logic resides on a thin
client - All or most of the application logic resides on a
fat client - Thin clients are becoming popular because
- Systems are easier to manage since only the
server application logic generally needs to be
updated - Thin clients are cheaper
15More on clients and servers
- http//www.serverwatch.com/
- Technical focus 2.1 p.34
- Assignment1
16Best practice architecture
- Often, the application architecture is given. So
no decision has to be made - When it is not given, 3 criteria help select an
architecture - Cost of Infrastructure mainframes are expensive,
which is why client-based and C/S architectures
have become popular - Scalability refers to the ability to increase (or
decrease) computing capacity as network demand
changes. C/S architectures are the most scalable
(both clients and servers can be added (reduced)
to fit network requirements) - Cost of Development Lower for any architecture
that uses off-the-shelf software - ? For most projects, a C/S architecture, usually
a three-tier thin or thick client, is
recommended p.41
17Application exerciseMore on C/S architecture
- Rate the C/S architecture using the criteria
below - Centralized data storage
- Prevention of unauthorized access to
file/applications - Reliability (built-in reliability)
- Network administration
- Performance (processing)
- Number of users
- Relative (total) cost
18Illustration The case of the WWW
19How the WWW works
- Based on a C/S architecture
- Uses the Hypertext Transfer Protocol (HTTP)
- Web clients (browsers) make HTTP requests to Web
servers. Web servers answer with HTTP responses. - Clicking on a hyperlink or typing a URL into a
browser starts an HTTP request-response cycle - An HTTP request-response cycle can have multiple
steps - Case for web pages that contain embedded files,
each requiring a separate response
20How the WWW works (Figure 2-8)
21HTTP request
- Packet produced by application layer of client
- Has 3 parts
- Request line (required) includes command, URL
and the http version number - Request header (optional) includes information
on the browser, date, and the referring page - Request body (optional) includes information
user send to the server
Command URL HTTP version
GET http//www.kelley.indiana.edu/ardennis/home.ht
m HTTP/1.1 Date Mon 06 Aug 2001 173546
GMT User-Agent Mozilla/6.0 Referer
http//www.indiana.edu/aisdept/faculty.htm
Request line
Request Header
22HTTP response
- Packet produced by application layer of server
- Has 3 parts
- Response status (optional) http version number,
status code (e.g., 200 ok, 404 page not
found) and reason phrase (description of status
code) - Response header (optional) contains information
on the server, date, exact URL of the retrieved
page and format used for the body of the response
(e.g., html) - Response body (required) contains the requested
Web page - See next slide
23HTTP response from a web server Figure 2-10
HTTP ver. Status code Reason
HTTP/1.1 200 OK
Response Status Date Mon 06
Aug 2001 173546 GMT - Date Server NCSA/1.3 -
Web server Location http// www.kelley.indiana.ed
u/adennis/home.htm - URL Content-type
text/html- Type of file lthtmlgt ltheadgt lttitlegtAll
en R. Dennislt/titlegt lt/headgt ltbodygt ltH2gt Allen R.
Dennis lt/H2gt ltPgtWelcome to the home page of Allen
R. Dennislt/Pgt lt/bodygt lt/htmlgt
Response Header
Response Body
24Application exercises
- 1) Read minicase 2 p.60 61
- Which C/S architecture would you suggest? Why?
- 2) Which applications are supported by the
following protocols - SMTP
- FTP
- Telnet
25Thank you