Post on 18-Jan-2016
Chapter 13 1
Distributed Processing, Client/Server, and Clusters
Chapter 13
Chapter 13 2
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 3
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 4
TCP/IP Protocol Architecture
• Developed during work on the packet-switched network ARPANET
• Five independent layers• application• hot-to-host• internet• network access• physical
Chapter 13 5
TCP/IP Protocol Architecture
• Physical layer• physical interface between a data
transmission device and a network• deals with signals, data rate, etc.
Chapter 13 6
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 7
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 8
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 9
TCP/IP Protocol Architecture
• Application layer• contains protocols for specific user
applications
Chapter 13 10
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 11
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 12
Protocol Data Units in the TCP/IP Architecture
TCPHeader
NetworkHeader
IPHeader
User data ApplicationByte Stream
TCPSegment
IPDatagram
Network-LevelPacket
Chapter 13 13
TCP Header
Source Port Destination Port
Sequence Number
Acknowledgement Number
HeaderLength Unused Flags Window
Checksum Urgent Pointer
Options + Padding
Bit: 40 10 16 31
20 O
ctet
s
Chapter 13 14
User Datagram Protocol (UDP)
• Connectionless server
• Does not guarantee delivery
• It adds a port addressing capability to IP
Source Port Destination Port
Segment Length Checksum
Bit: 160 31
8 O
ctet
s
Chapter 13 15
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 16
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 17
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 18
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 19
OSI Layers
Application
Presentation
Session
Transport
Network
Data Link
Physical
Chapter 13 20
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 manage the database
Chapter 13 21
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 22
Generic Client/Server Environment
Chapter 13 23
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 24
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 25
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 26
Client/Server Architecture for Database Applications
Client Workstation
Presentation Services
Application Logic
Database Logic
Communications Software
ClientOperating System
Hardware Platform
Server
Database Logic
Communications Software
Database Management System
Server Operating System
Hardware Platform
Request
Response
ProtocolInteraction
Chapter 13 27
Client Server
Presentation Logic
Application Logic
Database Logic
DBMS
Classes of Client/Server Applications
• Host-based processing• not true client/server computing• traditional mainframe environment
Chapter 13 28
Client Server
Presentation Logic
Application Logic
Database Logic
DBMS
Classes of Client/Server Applications
• Server-based processing• server does all the processing• user workstation provides a user-
friendly interface
Chapter 13 29
Client Server
Presentation Logic
Database Logic
DBMS
Application Logic
Database Logic
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
Chapter 13 30
Client Server
Presentation Logic
Application Logic
Database Logic
DBMS
Application Logic
Classes of Client/Server Applications
• Cooperative processing• application processing is performed in
an optimized fashion• complex to set up and maintain
Chapter 13 31
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 32
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 33
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 34
The Role of Middleware in Client/Server Architecture
Client Workstation
Presentation Services
Application Logic
Middleware
Communications Software
ClientOperating System
Hardware Platform
Server
Middleware
Communications Software
Application Services
Server Operating System
Hardware Platform
ProtocolInteraction
Middleware Interaction
Chapter 13 35
Logical View of Middleware
Platform: OS Hardware
Application Application
Platform: OS Hardware
Middleware(distributed system services)
APIs
Platform Interfaces
Chapter 13 36
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 37
Basic Message-Passing Primitives
Message-passingModule
SendingProcess
ReceivingProcess
Message-passingModule
ProcessID Message
Chapter 13 38
Message-oriented Middleware
Client Server
Application-specificmessages
Ap
pli
cati
on
Ap
pli
cati
on
Mes
sage
-ori
ente
dM
idd
lew
are
Mes
sage
-ori
ente
dM
idd
lew
are
Tra
nsp
ort
Tra
nsp
ort
Net
wor
k
Net
wor
k
Chapter 13 39
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 40
Remote Procedure Call Mechanism
ClientApplication
ClientApplication
Remote ServerApplication
Remote ServerApplication
Local Applicationor
Operating System
Local Applicationor
Operating System
Local StubLocal Stub
RPCMechanism
RPCMechanism
Local StubLocal Stub
RPCMechanism
RPCMechanism
Remote Procedure Call
LocalResponse
LocalResponse
LocalResponse
LocalProcedure
Call
LocalProcedure
Calls
Remote Procedure Call
Chapter 13 41
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 42
Remote Procedure Calls
Client Server
Application-specificProcedure Invocations
and Returns
Tra
nsp
ort
Tra
nsp
ort
Net
wor
k
Net
wor
kApplication
RPCStub
Program
Application
RPCStub
Program
Chapter 13 43
Object Request Broker
Client Server
Tra
nsp
ort
Tra
nsp
ort
Net
wor
k
Net
wor
kApplication
RPCStub
Program
ObjectServer
Object Requestsand Responses
Object Requestsand Responses
ObjectRequestBroker
Transport
Network
Chapter 13 44
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 45
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 46
Clusters
Standby Server with No Shared Disk
High-Speed Message LinkI/O
P
I/OI/O I/OM M
P PP
Chapter 13 47
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 48
Clusters
Shared Disk
High-Speed Message Link
I/O
P
I/OI/O I/OM M
P PPI/O I/O
RAID
Chapter 13 49
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 50
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 51
Windows NT Wolfpack
PhysicalResource
DLL
LogicalResource
DLL
AppResource
DLL
AppResource
DLL
Cluster API DLL
Cluster Management Tools
Cluster-awareApp
DatabaseManager
Global UpdateManager
EventProcessor
CommunicationManager
NodeManager
Non-awareapp
Resource MonitorsResourceManagementInterface
ClusterService
RPC
OtherNodes
Failover MgrResource Mgr
Chapter 13 52
Solaris MC
• Prototype distributed operating system built as a set of extensions to Solaris UNIX
• Provides cluster with a single-system image
Chapter 13 - 53 pages 53
Solaris MC Structure
Other NodesOther Nodes
Network
File System Process
C++ Object Framework
Existing Solaris 2.5 Kernel
Applications
Object InvocationsSolaris MC
System Call Interface