Professional Documents
Culture Documents
Client Server
Client Server
Client/Server Architectures
By Jim Clarke, Todd Bowman and Jim Stikeleather
RESOURCE C
CAL ON
NI
TH E T ECH
NE
CTION
•
•
IN
C O D
E
R P O R AT
6 Next Generation Computing
Contents
6 Abstract
7 Introduction
19 Conclusion
20 References
21 Suggested Readings
©Copyright 1996, by The Technical Resource Connection, Inc. All rights reserved. No part of this document may be reproduced or copied in any form or
by any means, electronic or mechanical, including photocopying, recording or by information storage and retrieval system without permission in writing.
Client/Server Architectures 7
Abstract
A
s client/server technology evolves, organizations that are responsible for
information management are beginning to see the benefits of performance
economies, data integrity and code reuse. However, the client/server
architectural models widely used in today’s application development environments
do not realize the full potential of client/server technology. This white paper
overviews the two- and three-tier architectural models and introduces how an n-
tier architectural model can further realize the potential of client/server technology
for the business enterprise.
8 Next Generation Computing
Introduction
I
nformation systems have evolved through several that were not synchronized with the central informa-
generations or eras over the past 30 years. Each tion systems. The integrity of business information
new generation of technology has been accompa- suffered as a result.
nied by a shift in how developers think about and
design systems. Each new generation changes the The next logical step was to solve the problem of
computing paradigm. providing data sharing and integrity. By incorporating
the respective powers of both centralized and decentral-
Historically, applications were designed based on a ized computing resources, client/server models of
centralized, terminal-to-host model. These systems, computing emerged and have continued to evolve. The
popularly termed legacy systems, placed the entire set of first stage of client/server computing utilized the data
functionality of business applications in a host main- storage and processing power of centralized database
frame computer. Business processing logic, data systems and decentralized presentation of information
maintenance and reporting functions were all processed on desktop systems. Simply put, a client is an entity
on the central mainframe. Users gained access to their that requests that some service be performed. A server
systems through dumb terminals that included charac- fulfills the requests. The terms, when used properly,
ter-based menus and data entry screens. have no implications for particular types of hardware or
software components. Several means can be used to
With the advent and widespread use of personal partition functionality (database processing, business
computers and local area networks in the 1980s, application logic, and user presentation) between
departments within an organization were empowered to clients and servers. The common approaches to
automate many of the department’s business functions partitioning functionality are summarized in the
without involvement of the central computing re- sections that follow.
sources or staff. However, this approach often necessi-
tated the maintenance of duplicate sets of information
Client/Server Architectures 9
E
arly client/server systems were based on a two- The two-tier architectural model dictates that the client
tier model of partitioning functionality. The and server communicate directly with each other in a
two-tier architecture consists of: highly rigid and tightly coupled relationship. While
the server may be capable of handling a wide-range of
• a client, often referred to as the “front-end,” database requests, the client process expects results from
responsible for application presentation and the server to be presented in a well-defined, pre-
business application logic ordained manner. Additionally, the communications
Client Process
(Presentation & Business
Application Logic)
Request
Tightly Coupled
Response
Server Process
(Data Management — integrity
rules, adds, deletes, updates)
Figure 1
A Two-Tier Client/Server Model
• a server, often referred to as the “back-end,” mechanisms between client and server must be fully
responsible for data management functions: synchronized. Since the client and server are tightly
data integrity, retrieving, adding, removing coupled, when one process implements a change, the
and updating. other process must be modified to accommodate the
change. This applies whether the database scheme or
A typical two-tier client/server application is shown in functionality is changed. Extremely high maintenance
Figure 1. efforts and costs are experienced with the two-tier model.
10 Next Generation Computing
T
he three-tier architectural model advances the front or back-end process, implemented as a Dy-
two-tier model by inserting a “middle tier.” namic Link Library (DLL) or Application Program
The middle tier is responsible for maintaining Interface (API), or accessed by Remote Procedure
business logic, rules and access to data from the server. Calls (RPC) or messages. The major thrust here is
Therefore, the client process is responsible only for that the middle tier provides a level of abstraction
presentation and user interface logic. Figure 2 illus- from both the client and server tiers. This abstraction
trates a typical three-tier client/server architecture. creates a more loosely coupled interface between
Server
(Data Management)
Client 1
(Presentation)
Middle Tier
(Business
Application, Logic
Client 2 & Transport)
(Presentation)
Figure 2
A Three-Tier Client/Server Model
The middle tier is a logical 1 tier and as such does not client and server while simultaneously providing a
require a third level of hardware support. Instead, it is consistent interface to the server. This allows many un-
a process that could run on either the client or the related clients to utilize the same server. If a server is
server. The middle tier could be compiled into the constructed with all of the integrity rules for the
Client/Server Architectures 11
T
he n-tier architectural model describes a highly small pieces may be part of a larger functional piece,
modular approach to creating client/server such as application logic, they may be referenced
relationships. While this model is built upon individually. With that in mind, the n-tier architec-
traditional concepts of clients and servers, the “pieces” tural model can be defined as a layered model, with
upon which it is built are smaller and functionally each layer providing a specific function in the overall
specialized components that can be reused across scope of the application. The number of layers com-
multiple projects. The functional pieces of the two and prising an application depends on the requirements of
three-tier architectural models (presentation, business the application and systems resources available. Several
application logic, and data management) are broken services are needed to span the various layers and
down even further in an n-tier model. provide cohesion between them.
With the exception of presentation, functional pieces Figure 3 presents an example of how an n-tier client/
are broken down into very small chunks. While these server model might be designed for a report generation
Presentation Provides display services to specification and submission layers along with results verification.
Specification Who? What? Where? When? Why? How?
Login ID Request Destination Schedule Purpose Exec. Plan
Submission Joins Who, What, Where, When & Why (Complete Job Specs). N M
A E
Re-Specification Request is translated from a “what” to a command set. V S T
I E E
Triggering Job awaits trigger (i.e., date/time, job completion, data available). G C R
A U I
T R N
Queuing Provides load balancing and prioritizing of jobs. I I G
O T
Accessing Interfaces to services in the execution layer. N &
Y
L
Execution Data Access Column Ordering Row Ordering Formatting O
Server executes any jobs that are submitted from the queuing layer. G
Figure 3
An N-Tier Client/Server Architectural Model
Client/Server Architectures 13
S
ome of the benefits of object orientation can be — for example, the account, purchase order and
derived in fine-grained client/server applications customer servers — insulate the views from the
without actually moving to objects. Figure 4, A technology. The Account Server is using a screen
Customer Service Application, illustrates how. scraper via keyword messages to get to a mainframe
system. If required, the mainframe system can be
This application includes five viewers or human replaced with something else, and all applets using the
interface servers. First is an “action” viewer. When a Account Server will not need to be changed.
user logs into the application, the action viewer is
initiated along with any “applications” available to the Let’s say the customer needs information on a product
user. When these applications start, they send a they ordered. By double clicking the line item in the
message to the action viewer with an icon(s) to display, PO viewer, the Product server is launched and sends a
and a message(s) to send when the icon is selected. In message that, in turn, brings up the Product Viewer.
this case, the “new customer entry,” “product viewer,” This can show references and documentation, and
and “new purchase order” applets “publish” themselves access an expert system for help/questions, as well as
to the action viewer. Applets are single function show current inventory in case the product is being
applications or processes. ordered. Notice the technology insulation (APPC) and
the problem domain focus.
Also initiated at log-in, although not published to the
action viewer, are an Automatic Number Identification If the telephone interaction is for a new customer or a
(ANI) applet and a “Customer” domain server. When new order, selecting the appropriate icon brings up the
a phone call comes in, the ANI applet sends a customer appropriate viewer in new or blank mode. As the
inquiry message to the Customer server. It in turn information is completed, a message is sent to the
accesses the customer database, packages up a customer customer or PO server. This is the same message that is
message, and initiates and sends it to a customer viewer. sent by the viewer if an existing customer or PO is
The customer viewer parses the message for keywords changed. The server knows the message contains a
(we have uncoupled the messages and applets from any modified “record” and passes it to an edit. The edit
data structure) to populate the screen, including an applet passes a “clean” message to the server, which then
error message if the phone number was not found in updates persistent storage. The servers have no idea
the database. This Customer Viewer sends inquiry what the viewers are displaying, or even how many
messages to the Account Server and Purchase Order views are outstanding. After sending the message
(PO) Server, who in turn cause their viewers to display successfully, the sender does not wait for the unit of
any information they have related to this customer. work to be completed. Also, the PO view might
broadcast a message for any customer. All such
All the information available about the customer is now messages are asynchronous.
on the screen ready for the customer service representa-
tive to field the call. The information comes from This application can evolve over time. A new account-
many sources (data content) and is brought together by ing system does not change the system. Moving the
the views (data context). The problem domain servers shipping database from the mainframe to another
Client/Server Architectures 15
ANI
Action APPLET
Viewer
New Customer
Entry
Customer
Customer Edit
Viewer
Customer Sybase
PO SQL
Server DB2
PO Edit
Viewer PO
Figure 4
A Customer Service Application
16 Next Generation Computing
machine does not change the system. Changing data • Client/server is a relationship, not a
formats of the messages — for example, EBCDIC to location.
ASCII — does not change the system. The system
could be expanded by adding a “Customer Credit” • All executables can be both a client and a
applet that checks balances for credit limits or server.
accesses an on-line service for credit verification.
Changing the business rules for granting credit does • Messaging should be asynchronous and
not change the system — it only changes one applet. publish-and-subscribe-based if possible, to:
Automatic mailing applets, such as order confirma- a) promote information hiding; b) support
tions and product information, can be added. New parallel and pipeline processing to improve
systems, like an Internet-based, on-line ordering performance; and c) uncouple processes and
application, can reuse the same components. What- encourage reuse.
ever “application” is being used, the information is
always displayed and interacted within the same • Separate functionality into separate servers:
consistent manner. In effect, we have gained most of technology (communications), data content
the benefits of object technology, except inheritance, (files), data context (relationships), state
without totally going to object orientation. maintenance (transactions), integrity
(dependencies, security), interfaces (human,
Further, applications become very event — rather computer, EDI), business rules, processes
than transaction — driven. In a typical business, (actual applications), and workflow (se-
transactions and rules change rapidly, but events tend quences of events).
to stay constant. This makes the systems resilient to
changes in the business and work flows. Code tends • Create single-entity problem domains (e.g.,
to be smaller and more easily grasped by a program- Customer, Vendor, Product).
mer unfamiliar with the applet, simplifying mainte-
nance and reducing its costs. Applets can run on any • Create applets: single functionality applica-
system on the network. This type of architecture tions/processes in the problem domains
allows the business to take advantage of its hardware (e.g., new customer entry, new purchase
investment by dynamically reconfiguring applet order, back order, etc.).
execution on different machines for load balancing.
• Whenever possible, use the meta informa-
Some caveats are in order, since this application (see tion (i.e., keyword-based messages) to
Figure 4) is a simplified example. We have not uncouple clients and servers.
covered all the design issues and use-case scenarios,
although the architecture is robust enough to handle This section has led us through the evolving ap-
them. And, we have not explained technically how proaches to client/server architectures. An assess-
to do things like addressing the messages. However, ment of these architectures is presented next.
we can generalize some guidelines for object-driven
client/server design:
Client/Server Architectures 17
M
ost systems have server architectures, changes
several common impact the system dramati-
requirements that cally. In the case of two-tier
any computing architecture
One of the strategic architectures, changes in either
must support. These objectives of moving clients or servers impact each
requirements may vary in other: A change in one
their relative weight and away from a mono- requires a change in the other.
importance to the final In a well-designed three-tier
solution. An n-tier architec- lithic implementation architecture, the middle tier
helps to insulate the impact of
tural model supports each of
these requirements and
is to be responsive to changes to some extent.
provides a framework for business change. However, maximum flexibility
long-term solutions to is achieved with the n-tier
enterprise information model if it is deployed in
needs. Client/server combination with better
architectures must meet the abstractions of the business.
following requirements:
Object-oriented technology is the key to developing
the needed business abstractions. Objects hide their
Changeability data structures and implementation details from all
One of the strategic objectives of moving away from a other objects. Changes to objects have no effect on
monolithic implementation is to be responsive to other objects as long as the interfaces (public meth-
business change. Unfortunately, client/server ods) remain the same. The application of object
applications can be as difficult to change as the orientation to client/server architectures holds much
monolithic legacy applications they replace. For promise for developing information systems that can
example, a legacy database application may be adapt to ever-changing business needs.
redesigned as a client/server solution, with clients that
include both presentation and business logic, and a
database server. Business rules and application logic Fault Tolerance
are embedded in umpteen scripts and screens. The system must be able to handle the loss of a
Making changes as simple as lengthening the size of particular component. A two-tier architecture has
just one data element in this environment is tedious three points of failure: the client, the network and the
and prone to error. server. Strategies such as mirroring, replication and
RAID are used to achieve server fault tolerance in
The architecture and design paradigms used by the two-tier architectures. A three-tier architecture adds
traditional client/server technology prevent them another point of failure by introducing the middle
from resembling the business and adapting to tier. Techniques such as software routing can help
changing business needs. In conventional client/ protect middleware in a three-tier architecture.
18 Next Generation Computing
Using current transaction models, failure to obtain a abstraction are not part of such thinking. This
rental car may make this entire transaction collapse. myopic approach transfers many of the problems
Transactions such as these are called flat transactions. A found in monolithic solutions to the newer hardware
flat transaction can result in either of two outcomes: All platforms, including data management problems.
actions within a transaction are committed, and the
transaction is successfully completed; or failure of any
action rolls back all actions within that transaction.
Performance
Client/server systems must be designed very carefully
Let’s review a different problem that flat transactions if performance improvements are to be achieved. If a
are unable to handle — an application requiring that a monolithic application design is used (typical of two-
million updates be made to a database. The drawback tier systems), the net effect is to replace the powerful
to the flat transaction is that if the system fails with bandwidth of a mainframe channel with a 10MB
only one update incompleted, each of the preceding ethernet link. For client/server systems to perform
999,999 updates are rolled back. And breaking this effectively, they must be designed to support parallel,
large transaction into a million individual transactions asynchronous and distributed process models — much
does not help. If the application treats each of these like a human organization.
updates as an individual transaction and performs a
million flat transactions, processing may take at least Software Engineering Discipline
three times as long and lead to unacceptable response
Some quick math reveals a little dark secret in client/
times. server computing. Traditional computer systems
achieve a reliability rating of about 90 percent.3 If this
Transaction models for the future will handle business
same reliability is achieved with both client and server
events and the multitude of transactions they create
code in a two-tier architecture, the overall reliability of
dynamically. Event-driven systems, and the workflow
the system drops to 81 percent. Extending the math,
applications they make possible, require a sophisticated three-tier architectures can result in 73 percent
and robust approach to handling complex, cascading
reliability. The moral in this math story is that strict
transactions. The Object Management Group has
software engineering discipline is required to create
developed standards for next generation transaction
reliable client/server systems.
services.
Conclusion
P
atricia Seybold summarized the current state of client/server computing: “People are
stampeding toward client/server because they’ve been told it’s easy, and that’s just
not true. No matter what application development tools you choose, it’s extremely
difficult to design a high performance client/server application. It’s worse than black art.” 4
User expectations are very high as a result of the current press given to client/server
computing. For the most part, client/server applications have failed to live up to all the
press. The architecture, development methods and tools do not provide the adaptive and
robust computing environments needed in today’s business environment.
An n-tier architectural model resolves several issues that currently confront the developers
of enterprise-wide client/server systems. However, dividing computer systems into more
and more tiers does not totally simplify client/server application development and mainte-
nance. Conspicuously missing are the key abstractions of the business, the kind of abstrac-
tions naturally provided by object-oriented technology. The convergence of client/server
and object-oriented technology provides many of the solutions to problems inherent in
today’s popular client/server architectures. The technology that results from this conver-
gence is explored in The Technical Resource Connection’s white paper, Distributed Object
Computing for Business.
References
1
Shelton, Robert, “Business Objects,” Data Management Review, p. 50 (January
1995).
2
Stikeleather, James, “What’s a client, what’s a server?” Object Magazine, p. 88 (June
1994).
3
Putnam, Lawrence and W. Myers, Measures for Excellence: Reliable Software On Time,
Within Budget, Yourdin Press (1992).
4
Seybold, Patricia, “The Secret Shame of Client/Server Development,”
Computerworld (August 1993).
22 Next Generation Computing
Suggested Readings
Orfali, Robert, Dan Harkey and Jeri Edwards, Essential Boar, B. H., Implementing Client/Server Computing: A
Client/Server Survival Guide, Van Nostrand Reinhold Strategic Perspective, McGraw-Hill, Inc. (1993).
(1994). This book is witty, approachable and compre-
hensive — from operating systems and communica- Dewire, Dawna Travis, Client/Server Computing,
tions to application architectures that incorporate McGraw-Hill, Inc. (1993). Dewire explains how
database, transaction processing, groupware and distributed technology is evolving and offers advice on
distributed objects. While rich in content, it is also fun application development in distributed environments.
to read and contains almost 200 illustrations. More
than 100 pages of the book are devoted to distributed
object computing, the next generation of client/server
architectures.
CA L RESOURCE C
NI O
NN
TH E TECH
ECTION
•
IN
C O D
E
R P O R AT