8 Distributed System Client/Server

advertisement
Distributed Systems:
Client/Server Computing
1
Client/Server Computing
• Major trend in information systems, replacing both the centralized
approaches and alternative forms of distributed computing
• Main concepts
– Clients
• Single-user PCs or workstations with user-friendly, usually graphical,
interfaces
– Servers
• Provide a set of shared user services to clients
• Example: Database server, controlling a relational database
– Allows many clients to share access to the same database
– Can use a high-performance computer system to manage the database
– Network
• Clients and servers are connected to a LAN or WAN or by an internet of
networks
CS-550 (M.Soneru): Distributed Systems - Client/Server Computing: [Sta’01]
2
Client/Server Computing (cont.)
CS-550 (M.Soneru): Distributed Systems - Client/Server Computing: [Sta’01]
3
Client/Server Computing (cont.)
• Client/server architecture
– Platforms and the OSs may be
different
– Communications protocols and the
applications supported must be
common
– Allocation of application-level
tasks between clients and servers is
central to the architecture. It must:
• Optimize platform and network
resources
• Optimize the ability of users to
perform various tasks and to
cooperate with one another
– Presentation services in client must
provide a user interface (e.g., GUI)
that is easy to use, powerful, and
flexible
CS-550 (M.Soneru): Distributed Systems - Client/Server Computing: [Sta’01]
4
Client/Server Computing (cont.)
• Relational database applications
– Server is responsible for maintaining
the database using a database
management system software module
– Client has applications that make use
of the database
– Client/server interactions are in the
form of transactions in which the
client makes a database request and
receives a database response, e.g., the
Structured Query Language (SQL)
– Not all the application logic (e.g., data
analysis) has to reside in the client
CS-550 (M.Soneru): Distributed Systems - Client/Server Computing: [Sta’01]
5
Client/Server Computing (cont.)
• Example: Online access for record lookup
– Server is maintaining a database of 1 million records
– User wants to perform a search using a certain search criteria (e.g., records older
than 1999) and expects to find at most a few records
– First query yields a server response of 100,000 records
– User sends another query adding new qualifiers
– Response returns 1,000 records
– Client issues third request with additional qualifiers and receives a single record
CS-550 (M.Soneru): Distributed Systems - Client/Server Computing: [Sta’01]
6
Client/Server Computing (cont.)
• Example 2: Online access for record lookup
– Server is maintaining a database of 1 million records
– Client would like to compute the grant total of a certain field across many records
– The query results in 300,000 records transmitted, which would be a misuse of the
client/server architecture
– Solution: move part of the application logic to the server
CS-550 (M.Soneru): Distributed Systems - Client/Server Computing: [Sta’01]
7
Client/Server Computing (cont.)
•
Classes of client/server applications
–
–
Wide spectrum of implementations in partitioning work between client
and server
Host-based processing
•
•
•
All processing done on a central host
User’s station is limited to the role of a terminal emulator, even if it employs
a microcomputer
Traditional mainframe computing, not a true client/server architecture
CS-550 (M.Soneru): Distributed Systems - Client/Server Computing: [Sta’01]
8
Client/Server Computing (cont.)
•
Classes of client/server applications (cont.)
–
Server-based processing
• Most basic class of client/server configuration, early implementations
(thin client model)
• Client provides a graphical user interface
• Server provides all processing
• This configuration does not provide significant improvements in the
use of resources
CS-550 (M.Soneru): Distributed Systems - Client/Server Computing: [Sta’01]
9
Client/Server Computing (cont.)
•
Classes of client/server applications (cont.)
–
Client-based processing
• All application processing is done by the client, except for the data
validation routines
• Advantage: allows users to employ applications best suited for local
needs
• Most common client-server approach in use today
• Fat client model
CS-550 (M.Soneru): Distributed Systems - Client/Server Computing: [Sta’01]
10
Client/Server Computing (cont.)
•
Classes of client/server applications (cont.)
–
Cooperative processing
• Distribution of application processing is optimized, taking advantage
of the strengths of both client and server machines and of the best
distribution of data
• More difficult to set up and maintain
• Can lead to greater network efficiency and highest productivity gains
CS-550 (M.Soneru): Distributed Systems - Client/Server Computing: [Sta’01]
11
Client/Server Computing (cont.)
• Three–tier client/server architecture
– Application software is distributed
between three types of machines: a
(thin) client, a middle-tier server, and a
backend server
– The middle-tier server provides a
gateway function between the clients
and the different backend servers
• Convert protocols and map from
one type of database query to
another
• Can merge/integrate results from
different sources
• Can serve as a gateway between the
new desktop applications and the
backend legacy applications
– The middle-tier server is both a server
and a client: server for the thin client
and client for the backend server
CS-550 (M.Soneru): Distributed Systems - Client/Server Computing: [Sta’01]
12
Client/Server Computing (cont.)
• File cache consistency
– To reduce the performance penalty of accessing remote files, individual systems can use file
caches
– Typical distribution mechanism for caching files among network workstations: a file access
request in the client results in (1) request to client cache (“file traffic”), then to local disk
(“disk traffic”), then to file server (“server traffic”), cache and then disk
– Problem: caches can become inconsistent when the remote data are changed and local cache
is obsolete
– Solutions: (a) File locking techniques to prevent simultaneous file access by more than one
client, and (b) Sprite approach: on a write by a client, all other clients that opened the file are
notified
CS-550 (M.Soneru): Distributed Systems - Client/Server Computing: [Sta’01]
13
Client/Server Computing (cont.)
• Middleware
– The rapid development and deployment of client/server products has
outpaced the standards efforts: difficult to implement an integrated, multivendor client/server solution
– Developers need a set of tools that provide a uniform means and style of
access to system resources across all platforms
– Middleware:
• A set of standard programming interfaces and protocols that sit between the
application above and the communications software and operating system
below
• Hide the complexities and disparities of different network protocols and
operating systems
– Client and server vendors provide a number of middleware packages as
options
– The user selects a middleware strategy and then assembles equipment from
different vendors that support that strategy
CS-550 (M.Soneru): Distributed Systems - Client/Server Computing: [Sta’01]
14
Client/Server Computing (cont.)
• Middleware architecture
– The role of the middleware depends on the style of client/server computing used
– There is both a client and a server component of middleware
– Goal: allow an application or user at the client to access different services on
servers, even though the servers’ implementations may be different
– Many relational databases, even though they support Structured Query Language
(SQL), they also add proprietary extensions to SQL
– Example: A distributed system supporting a personnel department is using both
Gupta and Oracle databases
CS-550 (M.Soneru): Distributed Systems - Client/Server Computing: [Sta’01]
15
Client/Server Computing (cont.)
• A logical view of a distributed system using middleware
– The entire distributed system can be viewed as a set of applications and resources
available to its users
– Applications run over a uniform Applications Programming Interface (API)
– The middleware operates over all client and server platforms and is responsible for
routing client requests to the appropriate servers
CS-550 (M.Soneru): Distributed Systems - Client/Server Computing: [Sta’01]
16
Client/Server Computing (cont.)
• An example of the use of middleware to integrate different products
CS-550 (M.Soneru): Distributed Systems - Client/Server Computing: [Sta’01]
17
Download