N6C11-PPT r1 for Instructors.PPT
Download
Report
Transcript N6C11-PPT r1 for Instructors.PPT
Networked
Applications
Chapter 11
Revised January 2007
Panko’s
Business Data Networks and Telecommunications, 6th edition
Copyright 2007 Prentice-Hall
May only be used by adopters of the book
Application
Architectures
An application architecture is the design decision
about which network host or hosts to use
to do the processing work in an application.
Figure 11-1: Simple Terminal-Host System
All Processing is done on the host.
Host gets overloaded: slow response.
Extensive network traffic: expensive.
Dumb
Terminal
Modem
Dumb
Terminal
Telephone
Network
Modem
Host
3
Client/Server Computing
• The client does at least some of the work
• Made possible by growing PC processing power
• Two versions
– File server program access
– Request/response processing
Client PC
Server
4
Figure 11-2: Client/Server Computing
File Server Program Access
1.
Program
Stored on
File Server
File Server
2.
Program
Downloaded to
Client PC
When Called
3.
Program
Executed on
Client PC Client PC!
Only useful for small programs (e-mail, word processing, etc.)
Because clients do not get very large
5
Figure 11-2: Client/Server Computing
Client/Server Processing with Request-Response Cycle
Request Message
Client Program
Response Message
Does Light I/O and
Post-Download
Processing
Client PC
Server Program
Does Heavy
Database
and Other Heavy
Processing
File Server
Highly scalable: Use larger server as number of clients increases
6
Figure 11-3: Web-Enabled Application (E-Mail)
HTTP Request Message
Client is Browser
Client PC
HTTP Response Message
Server Program
Web-enabled applications:
Form of client server processing
that uses browsers as clients
Almost all client PCs
now have browsers.
No need to install new software.
E-Mail Server
7
E-Mail
Figure 11-5: E-Mail Standards
2.
SMTP
To Send
1.
SMTP
To Send
Sender’s Mail
Server
Sending
E-Mail
Client
Receiver’s Mail
Server
Simple Mail Transfer Protocol
(SMTP) is used to transmit mail
in real time to a user’s mail
server or between mail servers
Receiving
E-Mail
Client
Sender-initiated
9
Figure 11-5: E-Mail Standards
Sender’s Mail
Server
Sending E-Mail
Client
Receiver’s Mail
Server
POP or IMAP to download mail to
receiver when the receiver next
downloads mail.
POP or
IMAP
To Receive
Receiving
E-Mail
Client
Receiver-initiated
10
Figure 11-5: E-Mail Standards
Sender’s Mail
Server
Receiver’s Mail
Server
Message Body Format Standard
Sending
E-Mail
Client
Message
RFC 822 or 2822
HTML body
UNICODE
Receiving
E-Mail
Client
11
Figure 11-4: E-Mail
• E-Mail Standards
– Receiver must understand sender’s message
– Message body standards
• RFC 822 and RFC 2822 for all-text bodies
• HTML bodies with fancy text and graphics
• UNICODE for characters in any language
12
Figure 11-6: Interactions in the Simple Mail
Transfer Protocol (SMTP)
Actor
SMTP Command
Comment
Client SMTP
Process
None
Connects to server
Via TCP
Server SMTP
Process
Client SMTP
Process
Server
When a TCP connection
220 Mail.Panko.Com Ready
is opened, the server
signals that is is ready.
Client asks to begin
HELO Voyager.cba.Hawaii.edu sending a message.
Gives own identity.
Server signals that it
250 Mail.Panko.Com
is ready to begin
receiving a message.
13
Figure 11-6: Interactions in the Simple Mail
Transfer Protocol (SMTP)
Actor
SMTP Command
Comment
Client
MAIL FROM: Bob@
voyager.cba.hawaii.edu
Client identifies the sender
(mail author, not SMTP
process).
Server
250 OK
Accepts author. However,
may reject mail from others.
Client
RCPT TO: [email protected]
Identifies first mail recipient.
Server
250 OK
Accepts first recipient
14
Figure 11-6: Interactions in the Simple Mail
Transfer Protocol (SMTP)
Actor
SMTP Command
Comment
Client
RCPT TO:[email protected]
Identifies second mail
recipient.
Server
550 No such user here
Does not accept second
recipient. However will
deliver to first recipient.
Client
DATA
Message will follow.
Server
354 Start mail input; end with
<CRLF>.<CRLF>
Gives permission to send
message.
15
Figure 11-6: Interactions in the Simple Mail
Transfer Protocol (SMTP)
Actor
SMTP Command
Comment
Client
When in the course …
The message. Multiple lines
Of text. Ends with line
Containing only a single
Period: <CRLF>.<CRLF>
Server
250 OK
Server accepts message.
Client
QUIT
Requests termination of
Session.
Server
221 Mail.Panko.Com Service
Closing transmission channel
End of transmission.
Server
None
Closes TCP connection.
16
Figure 11-4: E-Mail
• Viruses, Worms, and Trojan Horses
– Widespread Problems
• Often delivered by e-mail attachments
• Use of antivirus software is almost universal but not
fully effective
17
Figure 11-4: E-Mail
New
• Messages With Inappropriate Content
– Racial or sexual harassment
– Threats
– Disclosing proprietary information
– These must be found to prevent damage (lawsuits and
loss of intellectual property)
18
Figure 11-4: E-Mail
• Viruses, Worms, and Trojan Horses
– Where to Do Scanning?
• On client PCs
– But users often turn off their software,
– Fail to download virus definitions regularly
– Or let their contracts lapse
• On the corporate mail server or application firewall
– Users cannot turn off
19
Figure 11-4: E-Mail
• Viruses, Worms, and Trojan Horses
– Where to Do Scanning?
• At an antivirus outsourcing company
– Before mail ever reaches the company
– High level of expertise
• Defense in Depth
– Do filtering in at least two places
20
Figure 11-4: E-Mail
• Spam
– Unsolicited commercial e-mail
– Why filter?
• Potential sexual harassment suits
• Time consumed by users deleting spam
• Time consumed by networking staff to delete spam
• Bandwidth and storage consumed
• Some legitimate messages lost because dropped by
error
21
Figure 11-4: E-Mail
• Spam
– Separating SPAM from legitimate e-mail is difficult
• Many spam messages get through to users
• Some legitimate messages are deleted
• Some firms merely mark messages as probable spam
22
HTML and HTTP
Figure 11-7: HTML and HTTP
Browser
1.
HTTP Request
Webserver
Application
2.
HTTP Response
Webserver
Client PC
HTML Document
24
Figure 11-8: Downloading a Complex Webpage
with Two Graphics Files
HTML
Document
Browser
Client PC
Webserver
Application
Webserver
Two
Graphics
Files
Webpage Consists of Three Files
Rendered as a Single Page On-Screen
Webpage as
Displayed
25
Figure 11-8: Downloading a Complex Webpage
with Two Graphics Files
1.
HTML Document
Browser
Client PC
As
Displayed
HTML Document
Webserver
Application
2
Graphics
Files
Webserver
Download Requires 3
HTTP Request-Response Cycles;
Downloads HTML Page First
HTML Page Has Tags to Identify Other Files
26
Figure 11-8: Downloading a Complex Webpage
with Two Graphics Files
2.
Browser
Client PC
As
Displayed
3.
Webserver
Application
2
Graphics
Files
Webserver
Based on Tags in HTML Document,
Browser Requests Downloads of
Remaining Graphics or Other Files
Browser Renders Combined Webpage on Screen
27
Figure 11-8: Downloading a Complex Webpage
with Two Graphics Files
• Quiz: Your browser downloads a webpage with
three graphics images, a sound sequence, and a
Java applet. How many files will your browser have
to download?
28
Figure 11-9: Examples of HTTP Request
and Response Messages
• HTTP Request Message
– GET /panko/home.htm HTTP/1.1[CRLF]
– Host: voyager.cba.hawaii.edu[CRLF]
• Notes:
– CRLF: carriage return and line feed
• Two ASCII characters
• Start a new line
– Beyond the first line, each line is a field
• Variable name: value
29
Figure 11-9: Examples of HTTP
Request and Response Messages
• HTTP Response Message
– HTTP/1.1 200 OK[CRLF]
– Date: Tuesday, 20-JAN-2006 18:32:15 GMT[CRLF]
– Server: name of server software[CRLF]
– MIME-version: 1.0[CRLF]
– Content-type: text/plain[CRLF]
– [CRLF]
– File to be downloaded
30
Figure 11-9: Examples of HTTP Request
and Response Messages
• File to be Downloaded
– HTML documents are plain text files
• Only use keyboard characters
• Use the ASCII code to represent them
– Many other files are arbitrary strings of bytes
• Graphics files
• Sound files
• Etc.
• Come after the blank line following the response
header
31
E-Commerce
Figure 11-10: Electronic Commerce Functions
Browser
Webserver
Application
E-Commerce
Server
Customer
PC
External
Database
Internal
Database
33
Figure 11-10: EC Functions
• Webserver Functionality, Plus…
• E-Commerce functionality
– Online catalog
– Shopping cart
– Checkout, including payment
– Customer resource management (CRM)
– Links to External Systems
• Credit card number checking
• Bank settlement
34
Figure 11-10: EC Functions
• E-Commerce functionality
– Links to internal systems
• Accounting
• Pricing
• Warehousing (Product Availability)
• Shipment
• Etc.
35
Figure 11-11: Application Server (3-Tier
Architecture
Client PC
with
Browser
1.
Form
Webserver
Application
2.
Server
Data
Mainframe
1.
User fills in a form
using a browser
2.
Webserver sends
form data onto an
application server
Server of
External Company
Database
Server
36
Figure 11-11: Application Server (3-Tier
Architecture
Client PC
with
Browser
Webserver
3.
Mainframe
Query and
Application
Response
Server
Mainframe
3.
To get data needed to serve
the customer,
the application server
queries a mainframe database
and reads the information
in the response
Database
Server
Server of
External Company
37
Figure 11-11: Application Server (3-Tier
Architecture
Client PC
with
Browser
Webserver
Application
Server
4.
DB Server Mainframe
Query and
Response
5. External Query/
Response
Database Sever Interactions (4, 5)
Application program interfaces (API)
Both internal and external database hosts
Database
Server
Server of
External Company
38
Figure 11-12: E-Commerce Security
Subnet for
Internal Hosts
(Little or No Access
From Outside)
Main
Firewall
Ethernet
Switch
DMZ
Subnet
(Easy Access from Outside)
Customer
DMZ: Subnet for
Externally-Facing
Servers
Marketing
Client
Accounting
Server
E-Commerce
Server
39
Figure 11-12: E-Commerce Security
SSL/TLS
SSL/TLS provides
protection against
eavesdroppers
Customer
E-Commerce
Server
40
Software as a Service
(SAS)
Figure 11-13: Software as a Service (SAS)
Ordinary Webservice
HTTP Request
Browser
HTTP Response
Webserver
Application
Webserver
Client PC
HTML or Other Document
Ordinary webservice was created to download documents
42
Figure 11-13: Software as a Service (SAS)
SOAP
Request Message
(Parameters/
Calling
Properties)
Program
Client PC
Service
Object
SOAP
Response Message
Numerical Answer
Other
Computer
43
Figure 11-13: Software as a Service (SAS)
HTTP Request
Client PC
SOAPCapable
Browser
HTTP Response
SOAP Message
Using XML Syntax
Service
Object
Webserver
-Interface
Properties
Methods
SOA requests are sent to a service object via HTTP
They are sent as SOAP messages written in XML
44
Figure 11-14: Simple SOAP Request
and Response
• Simple Object Access Protocol (SOAP)
• Carried in HTTP request or response message
• Formatted using XML Syntax
– Similar to HTML syntax but
the sender and receiver can
create new tags that
they can then use in
transactions, such as
<price>$33</price>
HTTP Header
SOAP
Body
45
Figure 11-14: Simple SOAP Request and
Response
• Situation
– There is a pricing object that returns the price if another
object sends the part number, quantity, and shipping
type (rush, etc.) on an interface
– Objects can be on different computers
Request
(PartNum, Quantity, ShippingType)
Sending
Object
Pricing
Object
Response
(Price)
46
Figure 11-14: Simplified SOAP Request and
Response
• SOAP Request Message
Asks for price,
given part number, quantity,
and shipping type
HTTP Request Header pointing to program
<?xml version=“1.0”>
<BODY>
<QuotePrice xmlns=“QuoteInterface”>
<PartNum>QA78d</PartNum>
<Quantity>47</Quantity>
<ShippingType>Rush</ShippingType>
</QuotePrice>
</BODY>
Note: xmlns specifies an XML namespace for the object
47
Figure 11-14: Simple SOAP Request and
Response
• SOAP Response Message
Response gives
the price quote
HTTP Response Header
<?xml version=“1.0”>
<BODY>
<QuotePrice xmlns=“QuoteInterface”>
<Price>$750.33</Price>
</QuotePrice>
</BODY>
48
Perspective on SAS
New: Not
In Book
• Benefits of SAS
– Offers a way to standardize interactions between
objects over the Internet
– Can make distributed computing far simpler once
Web services standards are fully developed
• Concerns
– High overhead (very chatty)
– Standards immaturity
– Security is embryonic
49
Peer-to-Peer
Computing
Figure 11-16: Traditional Client/Server
Application
Client PC
Client PC
Advantage:
Central Control
Client PC
Client PC
Client PC
Disadvantages:
Network Overload at Server
Underused Client Power
Central Control
Server Does Heavy Processing Work
51
Figure 11-17: Simple Peer-to-Peer (P2P)
Application
Request
Client PC
Response
Benefits:
End User Freedom
No Network Bottleneck at Server
Uses Client Capacity Better
Client PC
Problems:
Transient Presence of Clients
Transient Client IP Addresses
Security (No Central Control)
52
P2P Applications
• Direct service, although most P2P systems use
facilitating servers for some of the work
Peer
Peer
Peer
Peer
Peer
Peer
53
Figure 11-18: Gnutella: Pure P2P Protocol
with Viral Networking
Gnutella
Client (ABC)
1. Init or
Search
Message
2.
Init or Search
Message
2. Init or
Search
Message
Gnutella
Client
(Carol)
3.
Init or Search
Message
Gnutella
Client (DEF)
3. Init or
Search
Message
3. Init or
Search
Message
4.
P2P File Download
HTTP Request-Response Gnutella
Cycle
Client (XYZ)
Gnutella
Client (GHI)
54
Figure 11-19: Napster
Napster
Index Server
1.
Uploads List
Of Available Files
When Connects
User A
File List
2.
Search Query
3.
Response
User B
List of
Available
Files
From All
Current Clients
4.
Large P2P
Download
User C
55
Figure 11-20: Use of Servers in Instant Messaging
Pure P2P IM
Ongoing IM
Communication
Client PC A
Client PC B
In pure P2P IM, there are no servers.
The clients communicate directly.
Finding each other can be difficult because DHCP may
give each client PC a different IP address
each time the client uses the Internet
56
Figure 11-20: Use of Servers in Instant Messaging
Use of a Presence Server
Presence Server
1.
Presence
Information
Client PC C
3.
Ongoing IM
Communication
2.
Presence
Information
Client PC D
Clients register with presence servers.
Presence servers notify other clients as appropriate.
Clients use this information to communicate directly.
57
Figure 11-20: Use of Servers in Instant Messaging
Use of a Relay Server
Relay Server
IM
Communication
Client PC E
All Communication
Goes through the
Relay Server
IM
Communication
Client PC F
Relay servers route all IM messages.
This permits security filtering and other services.
It limits privacy because the relay server sees everything.
58
Figure 11-21: SETI@Home Client PC Processor
Sharing
1. I am idle. Give me work.
2. Here is work to do
3. I am busy now. Here are my results.
Idle Client PC
With SETI@home
Screen Saver Program
SETI@home
Server
No Interaction
Busy Client PC
With SETI@home
Screen Saver Program
59
Web 2.0
New:
Not in Book
• Approximate Definition
– Users create the content
– Wikipedia
– YouTube
– MyFace
• Great Potential
• Security Challenges
– Privacy violations
– Fraud
60
Perspective on Application
Architectures
• Driven primarily by the evolution of client
processing power
• Terminal-Host: Client processing power was
uneconomical
• Client/Server: Client PCs could handle some of
the load
• P2P: Clients have rich power to do most things
61
Topics Covered
Topics Covered
• Application Architectures
– Terminal-host
– Client/server
• File server program access
• Client/server processing with request/response cycle
– Peer-to-peer (P2P)
– Evolution of architectures driven by growing desktop
computer power
63
Topics Covered
• E-Mail
– Sending: Simple Mail Transfer Protocol (SNMP)
– Retrieving: POP and IMAP
– Document format standards: RFC 822/2822, HTML, and
UNICODE
– Viruses, worms, and Trojan horses
• Where to do antivirus filtering?
– Spam
64
Topics Covered
• HTTP and HTML
– Webpages consist of an HTML document and multiple
graphics, etc. files
– Message transfer: HTTP
• Multiple downloads for the multiple files in a webpage
– MIME
65
Topics Covered
• E-Commerce
– E-Commerce : webservice with additional functionality
– Webserver interacts with customer browser
– Application server interacts with back-end databases,
passes webified response to the webserver for delivery
to the customer
– DMZ and SSL/TLS security
66
Topics Covered
• Software as a Service (SAS)
– Regular webservice: retrieve stored files
– SAS: use HTTP and extended HTML to handle programto-program interactions on different machines
– SOAP request message passes parameters to a service
object on another machine
– SOAP response message brings the reply
– SOAP messages are written in XML
67