Client / Server Methodology - Seneca

advertisement
Week 13-1. Client / Server Architecture
The client/server architecture splits business processes into 2 parts: one that sends the
request for a service (a Client) and another one that provides the service (a Server). The
Client/Server is based on the distribution of system functions between two independent
and autonomous processes: that of client and server. These Client and Server processes
must be able to communicate with each other. If client and server are located on separate
but networked computers, client/server system becomes at the same time distributed
system. However it is not required and client/server architecture may be implemented on
a stand alone computer.
The three components required in the Client /Server architecture are:
1. Client – is any process that requests specific services from the Server processes.
2. Server – is a process that provides requested services for Clients.
3. Communication Middleware – is the hardware and software that allows Clients and
Servers to communicate with each other.
Client / Server Methodology
The goal of client / server development
- is to maximize use of all processing and hardware capabilities of all computers
connected at a system. By maximizing the use of all computers in the system, Client /
Server will perform optimally in entering and retrieving information. The benefit of this
performance is to provide timely information retrieval to end users and to enhance
corporate competitiveness.
Accomplished by
Step1:
- client / server goals are accomplished by breaking down the entire set of functions
within a system (as much as possible) and developing each function as separate
applications. Some applications are Client Applications that request service
functions; and other applications are Server Applications that provide service
functions to those requesting.
Step 2:
- system performance is maximized by placing one or more applications (a function or
set of functions) on a separate computer in the system (connected computers) until the
processing demands are balanced between all computers in the system.
Database Design Issues
There are no additional database design issues from those already discussed.
Client/Server architecture does not require Conceptual Database Design changes, but
rather enhancements to the database design to support the Physical Implementation of the
database and development of the overall application.
Client and Server processes can reside on the same computer or separate computers
linked together by a network.
Implementation of client/server architecture makes some specific requirements to
Operating System. It must be capable to support multitask processing.
Client / Server Components
1. Client – is any process that requests specific services from the Server processes. Also
known as the front-end application that the end-user interacts with. The client always
initiates the conversation with the server. Front-end application always comprises UI and
optionally comprises other parts of application software.
2. Server – is a process that provides requested services for Clients. Also known as the
back-end application that provides background services for the client server. Backend
servers constantly listen for client requests. Examples of server services are:
File Services – disk storage in a LAN environment, usually with a fast hard drive
system.
Print Services – printing usually involves a shared printer accessible on the LAN.
With a client/server application, there is usually local data processing done on the
print server to offload work from the database computer.
Fax Services – a computer is equipped with a Fax modem and dedicated modem
line to be shared with other Clients on the system.
Communication Services – a computer should be dedicated to external
transmissions if a client PC must occasionally connect to other host computers or
services to which the client is not directly connected
Database Services – this is central to the client/server information system. The
client sends SQL statements to the database server. The database server (DBMS)
receives the SQL code, validates it, executes it, and sends only the results to the
client. The data and database engine are located in the database server.
Transaction Services – a transaction server is connected to the database server.
A transaction server contains the database transaction code or procedures that
manipulate the data in the database. The front-end application (client) sends a
request to the transaction server to execute a specific procedure stored on the
database server. No SQL code travels through the network. As a result,
transaction servers reduce network traffic and provide better performance than
database servers.
Miscellaneous Services – anything not already specified, such as shared CDROM, Tape drives, and backups.
3. Communications middleware - is any computer process used to maintain
communication between the client and servers. This usually requires a network. All client
requests and server responses travel through the network as messages that contain control
information and data.
Thin vs. Fat client
Dependently on how much of data processing has being provided by a client machine, we
do consider the following definitions:
Thin client
– a client that carries out a minimum of processing on the client side compared to the
server side (only GUI)
Fat client
– a client that carries out a larger part of the processing on the client side compared to the
server side.
Thin server
– a server that carries out a minimum of processing on the server side compared to the
client side.
Fat server
– a server that carries out a larger part of the processing on the server side compared to
the client side.
A mainframe environment does all processing on the mainframe side, and is ultimately
totally a fat server-based solution.
Tiers
2-Tier Client / Server System
The client requests services directly from the server. 2-Tier systems involve client to
server requests only. This is the minimum in client server. A 1-tier system is a bundled
application with no separation of processors. Such a 1 tier system is NOT client/server.
3-Tier Client / Server System
The client requests are handled by intermediate servers, which co-ordinate the client
requests with subordinate servers. 3-Tier systems involve client to server to server
requests. 3-Tier system example: Client – Database Middleware – Database Server
Multi-Tier Client / Server System
The client requests are handled by intermediate servers, which co-ordinate the client
requests with subordinate servers. The example: Client – Application Server (such as
WebLogic, WebSphere) – Database Middlware – Database Server
Middleware Components
Database Middleware
Another middleware component is a Database middleware. Database middleware
provides the connectivity between application software and database in client/server
environment. It has currently a dominant de facto standard, Open Database Connectivity
(ODBC), developed by Microsoft Corporation. ODBC is a standard middleware layer
that all database clients will be written to, and then have database vendors provide
individual drivers for their own database product to plug into this middleware layer.
Principal architecture is as follows:
Client App
Standard ODBC API
Driver Manager & Components
SQL Server
Driver
Oracle
Driver
DB2
Driver
The ODBC middleware provides the application programmer with a generic format for
data access. A specific ODBD driver (for example for Oracle, for MS SQL Server, for
DB/2) must be used for each database being accessed. They are developed by vendors.
Further development of ODBC is OLE DB (Object Linking and Embedding Database)
interface and ADO (ActiveX Data Object) for COM and Internet environment
JDBC (Java Database Connectivity) is an application programming interface
implemented as a set of Java classes and interfaces. It incorporates object orientation and
portability of Java applications. However most RDBMS interfaces are C based and rely
heavily on pointers, what are not available in Java. As a result JDBC drivers require
platform specific libraries what serve as a bridge between JDBC and ODBC. The JDBCODBC bridge is included as part of the JavaSoftJDBC SDK and provide JDBC API. As
for ODBC, the bridge is just another client application.
Client / Server Main Principles
Client server architecture is based on hardware and software components that interact to
form a system.
The following principles are the foundation on which client / server systems are built.
a) Hardware Independence
Client / Server / Comm middleware should function the same regardless of the hardware
used.
b) Software independence
Client / Server / Communication Middleware design should be able to be implemented
on choices of software, and not dependent on one software choice only.
c) Open Access to Services
Services must be provided on demand to the client. All clients should be able to use all of
the services provided on the network.
d) Process distribution (*** the key principle *** )
Processing of information is distributed among client and servers. The division of
processing should conform to these rules:
1. Client and Server Processes are Autonomous – meaning a client can run its
process independent of other clients and other servers.
2. Resource Optimization - Server processes should service multiple requests
from multiple clients to maximize utilization of resources.
3. Scalability and flexibility - require that the client and server processes can be
easily upgradeable to run on more powerful hardware and software platforms.
4. Interoperability and integration - require that client and server processes be
seamless, where swapping a server process is transparent to the client process.
Also, integration between separate databases is becoming more and more
common, especially due to the Internet presence and requirements.
e) Standards
Standards must be set to ensure that all components interact in an orderly manner to
achieve the desired results.
Download