Chapter 13 - Anvari.Net

Download Report

Transcript Chapter 13 - Anvari.Net

Distributed Processing,
Client/Server, and Clusters
Chapter 13
Chapter 13
1
Distributed Data
Processing
• Allows processors and data to be
dispersed
• Provides a system that is more responsive
to a users needs
• Minimize communication costs by
comparison with a centralized approach
Chapter 13
2
Distributed Data
Processing
• Personal computers
• many employees have one
• support user-friendly applications such as
word processing , spreadsheet, and
presentation graphics
• Mainframe
• corporate database
• sophisticated software for database
management
Chapter 13
3
TCP/IP Protocol
Architecture
• Developed during work on the packetswitched network ARPANET
• Five independent layers
•
•
•
•
•
application
hot-to-host
internet
network access
physical
Chapter 13
4
TCP/IP Protocol
Architecture
• Physical layer
• physical interface between a data
transmission device and a network
• deals with signals, data rate, etc.
Chapter 13
5
TCP/IP Protocol
Architecture
• Network access layer
• concerned with the exchange of data
between and end system and the network
• software used depends on type of network
• concerned with access to and routing data
across a network
Chapter 13
6
TCP/IP Protocol
Architecture
• Internet layer
• used when two devices attached to different
networks
• internet protocol (IP) is used to provide the
routing function
• routers are used to relay data from one
network to another
Chapter 13
7
TCP/IP Protocol
Architecture
• Transport layer
• provides logic for assuring that data
exchanged between host is reliably delivered
• protocol at this layer is the transmission
control protocol (TCP)
Chapter 13
8
TCP/IP Protocol
Architecture
• Application layer
• contains protocols for specific user
applications
Chapter 13
9
Operation of TCP and IP
• TCP may break a block into smaller pieces
to make it more manageable
• TCP appends information to each piece
• destination port
• sequence number
• checksum
• TCP hands the message down to IP with
instructions to send it to a host
Chapter 13
10
Operation of TCP and IP
• IP hands the message down tot he
network access layer with instructions to
send it to the router
• IP appends a header of control
information
• now called an IP datagram
• destination host address
• Network access layer appends header
information to create
a packet or frame
Chapter 13
11
Protocol Data Units in the
TCP/IP Architecture
User data
TCP
Header
Application
Byte Stream
TCP
Segment
IP
Datagram
IP
Header
Network-Level
Packet
Network
Header
Chapter 13
12
TCP Header
Bit: 0
10
4
16
20 Octets
Source Port
31
Destination Port
Sequence Number
Acknowledgement Number
Header
Length
Unused
Flags
Checksum
Window
Urgent Pointer
Options + Padding
Chapter 13
13
User Datagram Protocol
(UDP)
16
Bit: 0
8 Octets
• Connectionless server
• Does not guarantee
delivery
• It adds a port
addressing capability
to IP
Chapter 13
Source Port
Segment Length
31
Destination Port
Checksum
14
TCP/IP Applications
• Simple Mail Transfer Protocol (SMTP)
• provides basic electronic mail facility
• provides mechanism for transferring
messages among separate hosts
• includes mailing lists, return receipts, and
forwarding
Chapter 13
15
TCP/IP Applications
• File Transfer Protocol (FTP)
• used to send files form one system to another
under user commands
• allows user IDs and passwords to be
transmitted
• allows the user to specify the file and file
actions desired
Chapter 13
16
TCP/IP Applications
• TELNET
• provides remote log-on capability, which
enables a user at a terminal or personal
computer to log on to a remote computer
• user functions as if directly connected to the
computer
• remote terminals appear as local to the
application
Chapter 13
17
OSI Protocol Architecture
• Open Systems Interconnection
• Developed by the International
Organization for Standardization (ISO)
• Consists of seven layers
• Protocols are developed to perform the
functions at each layer
Chapter 13
18
OSI Layers
Application
Presentation
Session
Transport
Network
Data Link
Physical
Chapter 13
19
Client/Server Computing
• Client machines are generally single-user
PCs or workstations that provide a highly
user-friendly interface to the end user
• Each server provides a set of shared user
services to the clients
• The server enables many clients to share
access to the same database and enables
the use of a high-performance computer
system to manageChapter
the13 database
20
Client/Server Computing
• Involves splitting an application into tasks
and putting each task on the platform
where it can be handled most efficiently
• Processing for the presentation on the
user’s machine
• Data management and storage on a
server
• Involves a network
Chapter 13
21
Generic Client/Server
Environment
Chapter 13
22
Client/Server Applications
• Platforms and the operating systems of
client and server may differ
• These lower-level differences are
irrelevant as long as a client and server
share the same communications protocols
and support the same applications
Chapter 13
23
Client/Server Applications
• Actual functions performed by the
application can be split up between client
and server
• Optimize platform and network resources
• Optimize the ability of users to perform
various tasks
• Optimize the ability to cooperate with one
another using shared resources
Chapter 13
24
Database Applications
• The server is a database server
• Interaction between client and server is in
the form of transactions
• the client makes a database request and
receives a database response
• Server is responsible for maintaining the
database
Chapter 13
25
Client/Server Architecture
for Database Applications
Client Workstation
Presentation Services
Application Logic
Server
Request
Database Logic
Communications
Software
Client
Operating System
Hardware Platform
Database Logic
Response
Protocol
Interaction
Communications
Software
Database Management
System
Server Operating System
Hardware Platform
Chapter 13
26
Classes of Client/Server
Applications
• Host-based processing
• not true client/server computing
• traditional mainframe environment
Server
Client
Presentation Logic
Application Logic
Database Logic
DBMS
Chapter 13
27
Classes of Client/Server
Applications
• Server-based processing
• server does all the processing
• user workstation provides a user-friendly
interface
Server
Client
Presentation Logic
Application Logic
Database Logic
DBMS
Chapter 13
28
Classes of Client/Server
Applications
• Client-based processing
• all application processing may be done at the
client
• data validation routines and other database
logic function are done at the server
Server
Client
Presentation Logic
Application Logic
Database Logic
Database Logic
DBMS
Chapter 13
29
Classes of Client/Server
Applications
• Cooperative processing
• application processing is performed in an
optimized fashion
• complex to set up and maintain
Server
Client
Presentation Logic
Application Logic
Application Logic
Database Logic
DBMS
Chapter 13
30
File Cache Consistency
• File caches hold recently accessed file
records
• Caches are consistent when they contain
exact copies for remote data
• File-locking prevents simultaneous access
to a file
• writing causes the server cached to be
updated
Chapter 13
31
Middleware
• Set of tools that provide a uniform means
and style of access to system resources
across all platforms
• Enable programmers to build applications
that look and feel the same
• Enable programmers to use the same
method to access data
Chapter 13
32
Middleware
• Use of a standard programming interface
and protocols
• There is both a client and server
component to middleware
• Provides uniform access to different
systems
Chapter 13
33
The Role of Middleware in
Client/Server Architecture
Client Workstation
Presentation Services
Application Logic
Middleware
Communications
Software
Client
Operating System
Server
Middleware
Interaction
Protocol
Interaction
Hardware Platform
Middleware
Communications
Software
Application
Services
Server Operating System
Hardware Platform
Chapter 13
34
Logical View of
Middleware
Application
Application
APIs
Middleware
(distributed system services)
Platform Interfaces
Platform:
OS
Hardware
Platform:
OS
Hardware
Chapter 13
35
Distributed Message
Passing
• Message passed used to communicate
among processes
• Send and receive messages as used in a
single system OR
• Remote procedure calls
Chapter 13
36
Basic Message-Passing
Primitives
Sending
Process
Receiving
Process
Message-passing
Module
Message-passing
Module
ProcessID
Message
Chapter 13
37
Network
Transport
Message-oriented
Middleware
Application
Application-specific
messages
Chapter 13
Application
Message-oriented
Middleware
Client
Transport
Network
Message-oriented
Middleware
Server
38
Remote Procedure Calls
• Allow programs on different machines to
interact using simple procedure call/return
semantics
• Widely accepted
• Standardized
• client and server modules can be moved
among computers and operating systems
easily
Chapter 13
39
Remote Procedure Call
Mechanism
Client
Application
Local
Response
Remote Server
Application
Local
Response
Local
Response
Local
Procedure
Calls
Local Application
or
Operating System
Local Stub
Local
Procedure
Call
Local Stub
Remote Procedure Call
RPC
Mechanism
Remote Procedure Call
Chapter 13
RPC
Mechanism
40
Client/Server Binding
• Binding specifies the relationship between
remote procedure and calling program
• Nonpersistent binding
• logical connection established during remote
procedure call
• Persistent binding
• connection is sustained after the procedure
returns
Chapter 13
41
Remote Procedure Calls
Client
Server
RPC
Stub
Program
Chapter 13
Transport
Application-specific
Procedure Invocations
and Returns
Network
Network
Application
Transport
Application
RPC
Stub
Program
42
Object Request Broker
Client
Network
Transport
RPC
Stub
Program
Network
Object
Request
Broker
Application
Transport
Object Requests
and Responses
Network
Chapter 13
Transport
Server
Object
Server
Object Requests
and Responses
43
Clusters
• Alternative to symmetric multiprocessing
(SMP)
• Group of interconnected, whole
computers working together as a unified
computing resource
• illusion is one machine
• system can run on its own
Chapter 13
44
Clusters
• Separate server
•
•
•
•
each computer is a separate server
no shared disks
need management or scheduling software
data must be constantly copied among
systems so each is current
Chapter 13
45
Clusters
Standby Server with No Shared Disk
P
P
P
P
High-Speed Message Link
M
I/O
I/O
I/O
Chapter 13
I/O
M
46
Clusters
• Shared nothing
•
•
•
•
•
reduces communication overhead
servers connected to common disks
disks partitioned into volumes
each volume owned by a computer
if computer fails another computer gets
ownership of the volume
Chapter 13
47
Clusters
Shared Disk
High-Speed Message Link
P
M
P
I/O
I/O
I/O I/O
I/O
P
P
I/O
M
RAID
Chapter 13
48
Clusters
• Shared disk
• multiple computers share the same disks at
the same time
• each computer has access to all of the
volumes on all of the disks
Chapter 13
49
Windows NT Wolfpack
• Wolfpack is code name for clustering
technology
• Shared-nothing cluster
• Groups combine resources that are easily
managed
• Resources are implemented as
dynamically linked libraries (DLLs)
Chapter 13
50
Windows NT Wolfpack
Cluster Management Tools
Cluster API DLL
RPC
Global Update
Manager
Database
Manager
App
Resource
DLL
Cluster
Service
Node
Manager
Event
Processor
Failover Mgr
Resource Mgr
Communication
Manager
Other
Nodes
Resource Monitors
Physical
Resource
DLL
Cluster-aware
App
Logical
Resource
DLL
Resource
Management
Interface
App
Resource
DLL
Chapter 13
Non-aware
app
51
Solaris MC
• Prototype distributed operating system
built as a set of extensions to Solaris UNIX
• Provides cluster with a single-system
image
Chapter 13
52
Solaris MC Structure
Applications
System Call Interface
Network
Solaris MC
File System
Process
Object Invocations
C++
Other Nodes
Object Framework
Existing Solaris 2.5 Kernel
Chapter 13 - 53 pages
53