Client Server Architecture
Client Server Architecture
CONTENTS
1
Client/Server Architecture
2
Client/Server Architecture
UNIT I
Introduction to Client/Server
1.1 Introduction to Client/Server
1.2 Characteristics of the Client and the Server
1.3 Merits and Demerits of the Client Server
1.1 Introduction
Opportunities are available to organizations and people who are ready and able to
compete in the global market. A competitive global economy will ensure
obsolescence and obscurity to those who cannot or are unwilling to compete. All
organizations must look for ways to demonstrate value. We are finally seeing a
willingness to rethink existing organizational structures and business practices.
Client/server computing is the most effective source for the tools that empower
employees with authority and responsibility.
3
Client/Server Architecture
The Client/Server Computing has changed the way in which computers are being
used. This has a unique feature of having a strong foothold on the entire spectrum
of the computer industry.
For the “PC my World” lot, the Client/Server Computing means - scrapping of
every mainframe that cannot fit on the desktop and thus end of the host-centric
computing.
For the “Diehard fans of the Mainframes”, the Client/Server Computing means
unleashing the rebirth of the networked mainframes that will bring every PC in the
enterprise block to the fold.
For “Men in between”, it is a new era of Internet based co-existence and openness
in which all can play.
The protocol is the client requests the services from the server; the server
processes the request and returns the result to the client. The communication
mechanism is a message passing InterProcess communication (IPC) that enables
the distributed placement of the client and server processes
The Client/Server is the generic model and fits what is know in the industry as the
“cooperating processing” or “peer-to-peer”.The client/server computing is
fundamentally platform independent.
4
Client/Server Architecture
The changes in the platform and the underlying technology should be transparent
to the user, as it is understood that the systems built with transparency to the
technology, for the entire user offer the highest probability of solid ongoing return
for the technology investment. It is also easily demonstrable that is the developers
become aware of the target platform, development will be bound to that platform
and they will use special tricks and feature found in that specific platform.
The figure 1.1 shown below depicts the modern client/server architecture.
Mainframe
Terminals
Network
Minicomputers
Workstations
Server
5
Client/Server Architecture
2. Shared Resources: A server can service many clients at the same time and
regulate their access to shared resources.
9. Integrity: The server code and server data is centrally managed, which
results in cheaper maintenance and the guarding of shared data integrity. At
the same time, the clients remain personal and independent.
6
Client/Server Architecture
Client/server computing provides the capability to use the most cost-effective user
interface, data storage, connectivity, and application services. Frequently,
client/server products are deployed within the present organization but are not
used effectively.
Data that is collected as part of the normal business process and maintained on a
server is immediately available to all authorized users.
The use of Structured Query Language (SQL) to define and manipulate the data
provides support for open access from all client processors and software.
SQL grants all authorized users access to the information through a view that is
consistent with their business need. Transparent network services ensure that the
same data is available with the same currency to all designated users.
2. Integrated Services
In the client/server model, all information that the client is entitled to use is
available at the desktop. There is no need to change into terminal mode or log into
another processor to access information.
All authorized information and processes are directly available from the desktop
interface. The desktop tools—e-mail, spreadsheet, presentation graphics, and word
7
Client/Server Architecture
Desktop users can use their desktop tools in conjunction with information made
available from the corporate systems to produce new and useful information.
Thus, users may obtain client services and transparent access to the services
provided by database, communications, and applications servers.
Network services provide transparent connectivity between the client and local or
remote servers. With some database products, such as Ingres Star, a user or
application can define a consolidated view of data that is actually distributed
between heterogeneous, multiple platforms.
Systems developers are finally reaching the point at which this heterogeneity will
be a feature of all production-class database engine products. Most systems that
have been implemented to date use a single target platform for data maintenance.
The ability to do high-volume updates at multiple locations and maintain database
integrity across all types of errors is just becoming available with production-level
quality performance and recovery.
Systems developed today that use SQL are inherently transparent to data storage
location and the technology of the data storage platform. The SQL syntax does not
specify a location or platform.
8
Client/Server Architecture
We are moving from the machine-centered computing era of the 1970s and 1980s
to a new era in which PC-familiar users demand systems that are user-centered.
Previously, a user logged into a mainframe, mini-, or micro application. The
syntax of access was unique in each platform. Function keys, error messages,
navigation methods, security, performance, and editing were all very visible.
Today's users expect a standard "look and feel." Users log into an application from
the desktop with no concern for the location or technology of the processors
involved.
7. All the data is stored on the servers, which generally have far greater security
controls than most clients. Servers can better control access and resources, to
guarantee that only those clients with the appropriate permissions may access and
change data. Since data storage is centralized, updates to that data are far easier to
administer than what would be possible
9
Client/Server Architecture
Contrast that to a P2P network, where its bandwidth actually increases as more
nodes are added, since the P2P network's overall bandwidth can be roughly
computed as the sum of the bandwidths of every node in that network.
In P2P networks, resources are usually distributed among many nodes. Even if
one or more nodes depart and abandon a downloading file, for example, the
remaining nodes should still have the data needed to complete the download.
10
Client/Server Architecture
UNIT 2
2.2 ORB
i. File Server
• File Servers are useful for sharing information across the network
• The client passes a request for file records over a network to the file server.
• This is the most primitive type of data service used for exchanging
messages over the network to find the requested data.
• The file servers provide access to the remote server processors. In the
typical implementation the software, shared data, databases and backups are
stored on disk, tape and optical storage devices that are managed by the file
server.
Applicatio
n
11
Client/Server Architecture
• The client passes the SQL requests as messages to the database server; the
result of each SQL command is returned over the network.
• The code, which processes the SQL request and the data, reside in the same
machine, the server uses its own processing power to find the requested
data back to the client, instead of passing all the records back to the client.
This results in a much more efficient use of the distributed processing
power.
• Note that the application code resides on the client; thus you must either
write code for the client or you can buy a shrink-wrap query tool.
Applicatio
n
SQL
Applicatio CALLS DBMS Server
n
The client can invoke remote procedure or services that reside on the server with
an SQL database engine using the transaction server.
• The network exchange consists of a single request/ reply. The SQL
statements either all succeeded or fail as a unit.
12
Client/Server Architecture
• The OLTP are mission-critical applications that require a very less response
time (1-3 sec).
• The OLTP applications also require tight controls over the security and
integrity of the database.
Applicatio
n
Applicatio TRANSACTIONS
n DBMS
TP Monitor
13
Client/Server Architecture
Applicatio
n
Applicatio
n
File Server
• The client object uses the Object Request Broker (ORB) to communicate
with the server objects.
• The ORB locates an instance of that object server class, invokes the
requested method and returns the results to the client object.
14
Client/Server Architecture
• The server objects must support the concurrency and sharing aspects. The
ORB and a new generation of CORBA application servers bring it all
together.
• The commercial ORB’s that comply with the Object Management Group’s
CORBA standard include Iona’s Orbix, Inprise’s VisiBroker, ICL’s DAIS,
JavaSoft’s Java IDL , BEA’s ObjectBroker, IBM’s SOM and Expersoft’s
PowerBroker.
• In case of Microsoft, the MTS distributed object server is also the Web
Application Server. Whereas in case of CORBA/Java; Enterprise JavaBeans
has become common currency of Web Application servers.
15
Client/Server Architecture
2.2ORB
• Interface definition
• Location and possible activation of remote objects
• Communication between clients and object
The ORB must support many functions in order to operate consistently and
effectively, but many of these functions are hidden from the user of the ORB.
16
Client/Server Architecture
There are many ways of implementing the basic ORB concept; for
example, ORB functions can be compiled into clients, can be separate
processes, or can be part of an operating system kernel. These basic design
decisions might be fixed in a single product; or there might be a range of
choices left to the ORB implementer.
2.3.1 The knowledge about the Fat Servers and the Fat Clients
17
Client/Server Architecture
We must know that in the real/actual working environment both fat server and the
fat client may coexist in one application.
18
Client/Server Architecture
The gurus of the client/server architecture do not use the terms fat client and the
fat servers on the contrary they refer to them are 2-tier, 3-tier and N-tier
client/server architecture. This is the means by which they are functionally split.
The functional units comprise of user interface, business logic and the shared data.
SQL, File
Tier 1 I/O
HTTP
Two tier architectures consist of three components distributed in two layers: client
(requester of services) and server (provider of services).
19
Client/Server Architecture
1. User System Interface (such as session, text input, dialog, and display
management services)
2. Processing Management (such as process development, process enactment,
process monitoring, and process resource services)
3. Database Management (such as data and file services)
The two-tier design allocates the user system interface exclusively to the client. It
places database management on the server and splits the processing management
between client and server, creating two layers.
The application logic may be present at the client side within a user interface or it
may be present within the database on the server or on the both. It is most popular
because of its simplicity. These applications can be quickly built by using and
visual builder tools; which can be used for developing applications for decision
support system of small-scale groupware or you may build a simple web
publishing applications.
But the real problem arises only when you deploy them beyond the departmental
LAN. Typically the applications that worked perfectly well in prototypes and small
installations failed for large-scale productions. It actually went through a transition
phase, where it grew beyond the departmental LAN’s.
Thus the complex world is now faced by the 3-tier and the N-tier applications.
20
Client/Server Architecture
They are also easy to manage and deploy the network and most of the code runs
on the server. The protocol of interaction between the client and the server is as
follows:
The client calls for the business logic on the server, the business logic on the
behalf of the client accesses the database.
The 3-tier substitutes a few server calls for many SQL queries and updates so it
performs much better than 2-tier. A three tier distributed client/server architecture
includes a user system where user services (such as session, text input, dialog, and
display management) reside.
RPC,OR SQL
B,MOM, data
HTTP access
Tier 1
Tier 2
Dbms, Legacy and other
resource managers
Tier 3
Fig 2.3.2 b 3-tier Client/ Server Architecture
3-tier to N-tier
21
Client/Server Architecture
In the 3-tier applications, the middle tier is generally not a monolithic program but
is implemented as a collection of components that are initiated by several client-
initiated business transaction.
One component can call other components to help it implement a request; also
some components may act as gateways which may encapsulate legacy applications
running on mainframe.
According to Gartner Group’s for the smaller projects – 2-tier applications are
easier to develop than 3-tier, however as the application becomes more
complex, 2-tier applications become exponentially harder to develop.
According to Gartner Group, if your application has any of the following
characteristics then you may choose 3-tier architecture:
1. Many applications services/classes (around or more than 50)
2. Application programmed in different languages or written by different
organizations
3. An application life longer than 3 years.
4. If there are more than 50,000 transactions per day or more than 300
concurrent users on the same system accessing the same database.
22
Client/Server Architecture
5. Two or more heterogeneous data sources like two DBMS or a DBMS and a
file system.
Intergalactic Client/Server
When we think of client/server systems there are few questions, which come into
our mind, like
1. How is the application split between the client and the server?
2. What function goes into the client and what function goes in the server?
3. Can the client/server model accommodate business of all sizes?
4. Can the client/server play at home?
5. How are the new tribes of nomadic laptop users brought into the
client/server fold?
Now let us see are they used for the following four situations:
1. Client/Server for tiny shops and nomadic tribes
• Here the client, middleware software and most of the business
services run on the same machine.
• Suggested for implementation is home office, one-person shops and
mobile user with well-endowed laptops.
23
Client/Server Architecture
24
Client/Server Architecture
o Groupware Servers
o Object Servers
o Web
• The server is operating system dependent to interface with the
middleware.
• The server also runs a DSM component, which is once again a simple
agent on a managed PC to the entire back-end of the DSM application.
• The major database vendors are now offering an RPC-like mechanism for
executing functions that are stored in their databases. This mechanism is
sometimes referred to as “TP-Lite” or “stored procedure”.
• A stored procedure is typically treated like any other database object and
registered in the SQL catalog. The access to the stored procedure is
controlled through the server’s security mechanisms.
• They are
1. Used to enforce business rules and data integrity
2. Perform system maintenance and administration functions
3. To extend the database server’s functions
4. Used to create the server side of application logic.
5. It is also well suited for creating performance-critical applications
known as Online Transaction Processing OLTP
25
Client/Server Architecture
Over the years, good programmers have developed modular code using structured
techniques and subroutine logic. Today, developers want subroutines to be stored
as named objects "somewhere" and made available to everyone with the right to
use them.
26
Client/Server Architecture
Remote procedure calls (RPCs) provide this capability. RPCs standardize the way
programmers must write calls, so that remote procedures can recognize and
respond correctly.
The RPC hides the intricacies of the network by using the ordinary procedure call
mechanism familiar to every programmer.
A client process calls a function on a remote server and suspends itself until it gets
back the results. Here the parameters are passed like any ordinary procedure. The
server receives the request, unpacks the parameters, calls the procedure, and sends
the reply backs to the client.
While RPC makes life easier for the programmer, they pose a challenge for the
NOS designers who supply the development tools and run-time environments.
27
Client/Server Architecture
UNIT 3
Client Side Services
3.0 Services
3.1 Print Services
3.2 Remote Services
3.3 Utility Services
3.4 Message Services
3.5 Network Services
3.6 Application Services
3.7 Database Services
3.8 Dynamic Data Exchange (DDE)
3.9 Object Linking and Embedding (OLE)
3.10 Client Tools
3.11 GUI Clients
3.12 Non-GUI Clients
3.13 OOUI (Object Oriented User Interface) Clients
3.0 Services
3.0.1Introduction
The client in the client/server model is the desktop workstation. Any workstation
that is used by a single user is a client, if multiple users share the same workstation
simultaneously, then it is a server.
The famous servers like Apple Macintosh SE, an IBM PS/2 Model 30, an ALR
386/220, a Compaq System Pro, an NCD X-Terminal, Sun SPARCstation, a DEC
station 5000 all are used somewhere as a client workstation. There are no specific
technological characteristics of a client.
28
Client/Server Architecture
A client workstation requests services form the attached server; whatever may be
the type of processor the format of request is the same. It is the job if the NOS
software to translate or add the necessary details as required by the targeted
requester to the application request. OS also provides the redirection service.
Redirection
This service intercepts client workstation operating system calls and redirects them
to the server operating system.
Thus in this way the request for disk directories or disk files, printers, printer
queues, serial devices, application programs and named pipes are trapped by the
redirection software and redirected to the correct server location.
Let the local disk driver be labeled A: and C: and the remote drivers labeled D: , E:
and F:
1. Any request for drive A: of C: is passed through to the local file system by
the redirection software. Then the request is sent to the server OS.
2. The NOS requester software constructs the remote procedure call (RPC) to
include the API call to the NOS server.
29
Client/Server Architecture
3. The NOS server then processes the request as if it was executed locally and
ships the response back to the application.
The NOS enables the client to generate print requests even when the printer is
busy.
The NOS redirector software redirects it and the print server queue manage
further manage it.
The client has facility to view the status of the print queue at any time and
client is also notified when the print is completed. Similarly there are also fax
services.
NOS provide software, which runs on the client workstation to initiate these
remote applications.
Work from home is another concept, where the technology binds people
working from home and effectively communicates with the office LAN (Which
forms the Mobile Computing).
The operating system facilitates some local functions which are very often used
to perform actions like edit, copy, move, compare and help which works on the
client end.
Messages can be sent and received to or from the network synchronously. The
message services provide the buffering, scheduling and arbitration services to
support this function.
30
Client/Server Architecture
The client workstation communicates with the network through protocol, some
set of service and API’s that creates, send and receive and format network
messages.
Protocols, which are supported, are NetBIOS, IPX, TCP/IP, APPC, Ethernet,
Token Ring, FDDI, X.25 and SNA.
In addition to the remote execution services that the NOS provide, custom
applications will use their own API’s embedded in an RPC to invoke
specialized services form a remote server.
Database requests are made using the SQL syntax. SQL is an industry standard
language supported by many vendors.
Because the language uses a standard form, the same application may be run
on multiple platforms. There are syntactical differences and product extensions
available from most vendors.
31
Client/Server Architecture
DDE can be used to construct hot links between applications in which data can
be fed from window to window interruption and intervention.
Eg: A hot link can be created between a 3270-screen session and a word
processing
document. Data is linked form the 3270 window into the word processing
document. Whenever the key of the data in the screen changes, the data linked
into the document also changes.
DDE also supports warm links created so the server application notifies the
client that the data has changed and the client can issue an explicit request to
receive it. This information is attractive when the volume of changes to the
server data is so great that the client prefers not to be burdened with repetitive
processing.
If the server link ceases to exist at some point, use a warm link rather than hot
link to ensure that the last data iteration is available. You can create request
links to enable direct copy-and –paste operations between a server and client
without the need for an intermediate clipboard.
Here the documents are collection of objects, rather than a file, each object
remembers the software that maintains it.
The document contains the name of the file containing the data, along with
the picture of the data. When the source is updated all the documents using
the data are updated as well.
Both the DDE and OLE techniques require the user to be aware of the
difference between data sources.DDE and OLE provide a substantial
32
Client/Server Architecture
advantage any DDE or OLE-enabled application can use any software that
supports these data interchange API’s.
Not all Windows Application support OLE, to facilitate this the Microsoft
has release its OLE 2.0 software development kit (SDK).This toolkit
greatly simplifies OLE integration into third party, developed applications.
33
Client/Server Architecture
UNIT 4
Server Side Services
34
Client/Server Architecture
• The file server provides the initial space, and the database engine allocates
space for tables within the space provided by the file server.
• Print servers provide support to receive client documents, queue them for
printing, prioritize them, and execute the specific print driver logic required
for the selected printer.
• MVS servers provide support for SNA, TCP/IP, and some support for other
asynchronous communications.
• Security at the server restricts access to software and data accessed from the
server.
1. A client issues requests to the NOS services software resident on the client
machine.
2. These services format the request into an appropriate RPC and issue the
request to the application layer of the client protocol stack.
3. The application layer of the protocol stack on the server receives this
request.
35
Client/Server Architecture
Early database servers were actually file servers with a different interface.
Products such as dBASE, Clipper, FoxPro, and Paradox execute the database
engine primarily on the client machine and use the file services provided by the
file server for record access and free space management.
These are new and more powerful implementations of the original flat-file models
with extracted indexes for direct record access.
The application program, which issues lock requests and lock checks, manages
currency control and by the database server, which creates a lock table that is
interrogated whenever a record access lock check is generated.
Because access is at the record level, all records satisfying the primary key must
be returned to the client workstation for filtering.
There are no facilities to execute procedural code at the server, to execute joins, or
to filter rows prior to returning them to the workstation. This lack of capability
36
Client/Server Architecture
dramatically increases the likelihood of records being locked when several clients
are accessing the same database and increases network traffic when many
unnecessary rows are returned to the workstation only to be rejected.
The lack of server execution logic prevents these products from providing
automatic partial update backout and recovery after an application, system, or
hardware failure. For this reason, systems that operate in this environment require
an experienced system support programmer to assist in the recovery after a failure.
The primary design objective (of E.F Codd) behind SQL was to provide a data
access language that could be shown mathematically to manipulate the desired
data correctly.
Use of SQL
- The secondary objective was to remove any sense of the physical storage of data
from the view of the user. SQL is another flat-file implementation; there are no
embedded pointers. SQL uses extracted indexes to provide direct access to the
rows (records) of the tables (files) of interest. Each column (field) may be used as
part of the search criteria.
- SQL provides (especially with SQL2 extensions) a very powerful data access
language. Its algebra provides all the necessary syntax to define, secure, and
access information in an SQL database.
- The elegance of the language intrigued the user and vendor community to the
extent that standards committees picked up the language and defined a set of
standards around the language syntax.
37
Client/Server Architecture
- SQL1 and SQL2 define an exact syntax and a set of results for each operation.
As a consequence, many software vendors have developed products that
implement SQL.
- Dr. Codd has published a list of 13 rules that every SQL database engine should
adhere to in order to be truly compliant.
No products today can meet all of these criteria. The criteria, however, provide
a useful objective set for the standards committees and vendors to strive for. We
have defined another set of product standards that we are using to evaluate SQL
database engines for the development of client/server applications. In particular,
products should be implemented with support for the following products and
standards:
• Support for and compatibility with server NOS: NetWare, OS/2 (LAN
Manager, LAN Server), Windows NT, Mac System 7, and/or UNIX
(VINES, SCO, Sun, HP/UX USL, SVR4_), and MVS
• Support for client Operating Systems: DOS, Windows, OS/2, Windows NT,
Mac System 7, or UNIX (Solaris, USL, SCO, HP/UX, SVR4_)
38
Client/Server Architecture
The client/server model implies that there will be multiple concurrent user access.
The database engine must be able to manage this access without requiring every
developer to write well-behaved applications. The following features must be part
of the database engine:
• The enterprise on the desk implies that a single logon ID and logon
sequence is used to gain the authority once to access all information and
process for the user has a need and right of access. Because data may be
stored in a less physically secure area, the option should exist to store data
in an encrypted form. A combination of the user ID and password should be
required to decrypt the data.
39
Client/Server Architecture
The file services provide this support at the remote server processor. In the typical
implementation, software, shared data, databases, and backups are stored on disk,
tape, and optical storage devices that are managed by the file server.
New versions can be updated on the server and made immediately available to all
users.
In addition, installation in a central location reduces the effort required for each
workstation user to handle the installation process. Because each client
workstation user uses the same installation of the software, optional parameters are
consistent, and remote help desk operators are aware of them.
Backups of the server can be scheduled and monitored by a trained support person.
Backups of client workstations can be scheduled from the server, and data can be
stored at the server to facilitate recovery. Tape or optical backup units are typically
used for backup; these devices can readily provide support for many users
A support person who ensures that the backup functions are completed readily
monitors a central location. With more organizations looking at multimedia and
image technology, large optical storage devices are most appropriately
implemented as shared servers.
40
Client/Server Architecture
4.7Communications Services
41
Client/Server Architecture
UNIT 5
Network and Protocol Basics
5.0.1 Introduction
In the world of computers, networking is the practice of linking two or more
computing devices together for the purpose of sharing data. Networks are built
with a combination of computer hardware and computer software.
Networks can be categorized in several different ways.
One method defines the type of a network according to the geographic area it
spans.
Alternatively, networks can also be classified based on topology or on the types of
protocols they support.
One way to categorize the different types of computer network designs is by their
scope or scale. For historical reasons, the networking industry refers to nearly
every type of design as some kind of area network. Types of networks are: LAN -
Local Area Network
42
Client/Server Architecture
Most local area networks are built with relatively inexpensive hardware such as
Ethernet cables, network adapters, and hubs. Wireless LAN and other more
advanced LAN hardware options also exist.
The most common type of local area network is an Ethernet LAN. The smallest
home LAN can have exactly two computers; a large LAN can accommodate many
thousands of computers.
MAN is a network spanning a physical area larger than a LAN but smaller than a
WAN, such as a city. A MAN is typically owned an operated by a single entity
such as a government body or large corporation.
WAN spans a large physical distance. The Internet is the largest WAN, spanning
the Earth.
A WAN differs from a LAN in several important ways. Most WANs (like the
Internet) are not owned by any one organization but rather exist under collective or
distributed ownership and management.
43
Client/Server Architecture
WANs tend to use technology like ATM, Frame Relay and X.25 for connectivity
over the longer distances.
While LAN and WAN are by far the most popular network types mentioned, you
may also commonly see references to these others:
i. Topology
ii. Protocol
iii. Architecture
5.4.1 Topology
Bus Topology:
44
Client/Server Architecture
A bus topology means that each computer on the network is attached to a common
central cable, called a bus or backbone. This is a rather simple network to set up.
Ring Topology:
A ring topology means that each computer is connected to two others, and they
arranged in a ring shape. These are difficult to set up, but offer high bandwidth.
Star Topology:
A star topology means all computers on the network are connected to a central
hub. These are easy to set up, but bottlenecks can occur because all data must pass
through the hub. The Figure 5.4.a below depicts these three topologies:
Fig5.4.a
5.4.2 Protocols
Protocol specifies a common set of rules and signals the computers on the network
use to communicate. There are many protocols, each having advantages over
others. The most popular ones are:
• TCP/IP :
45
Client/Server Architecture
• IPX/SPX:
o Developed by Novell for use with its NetWare NOS, but Microsoft
built compatibility into both NT and Windows 9x. IPX is like an
optimized TCP/IP.
o It, too, is a routable protocol, making it handy for large networks,
but it allows quicker access over the network than TCP/IP. The
downfall is that it doesn’t work well over analog phone lines.
o IPX continually checks the status of transmission to be sure all the
data arrives. This requires extra bandwidth, where analog phone
lines don’t have much to begin with. This results in slow access. Of
course, the data is more reliable with IPX.
• NetBEUI :
5.4.3 Architecture
Architecture refers to one of the two major types of network architecture: Peer-to-
peer or client/server.
46
Client/Server Architecture
This is most commonly found in home configurations, and is only practical for
workgroups of a dozen or less computers.
The OSI reference model shown in Figure 5.5 provides an industry standard
framework for network and system interoperability.
Citicorp, for example, is working to integrate its 100 independent networks into a
single global net.
1 .The OSI model provides the framework definition for developers attempting to
create interoperable products.
2 .Because many products are not yet OSI-compliant, there often is no direct
correspondence between the OSI model and reality.
The OSI model defines seven protocol layers and specifies that each layer be
insulated from the other by a well-defined interface.
47
Client/Server Architecture
1. Physical Layer
• The physical layer is the lowest level of the OSI model and defines the
physical and electrical characteristics of the connections that make up the
network.
• It includes such things as interface specifications as well as detailed
specifications for the use of twisted-pair, fiber-optic, and coaxial cables.
• Standards of interest at this layer for client/server applications are IEEE
802.3 (Ethernet), and IEEE 802.5 (Token Ring) that define the requirements
for the network interface card (NIC) and the software requirements for the
media access control (MAC) layer.
• Other standards here include the serial interfaces EIA232 and X.21.
• The data link layer defines the basic packets of data expected to enter or
leave the physical network. Bit patterns, encoding methods, and tokens are
known to this layer.
• The data link layer detects errors and corrects them by requesting
retransmission of corrupted packets or messages.
• This layer is actually divided into two sublayers:
48
Client/Server Architecture
3.Network Layer
4.Transport Layer
• When a message contains more than one packet, the transport layer
sequences the message packets and regulates inbound traffic flow. The
transport layer is responsible for ensuring end-to-end error-free
transmission of data.
• The transport layer maintains its own addresses that get mapped onto
network addresses. Because the transport layer services process on systems,
multiple transport addresses (origins or destination) can share a single
network address.
5.Session Layer
• The session layer provides the services that enable applications running at
two processors to coordinate their communication into a single session.
• A session is an exchange of messages—a dialog between two processors.
• This layer helps create the session, inform one workstation if the other
drops out of the session, and terminate the session on request.
49
Client/Server Architecture
6.Presentation Layer
• The presentation layer is responsible for translating data from the internal
machine form of one processor in the session to that of the other.
7.Application Layer
• The application layer is the layer to which the application on the processor
directly talks. The programmer codes to an API defined at this layer.
• Messages enter the OSI protocol stack at this level, travel through the layers
to the physical layer, across the network to the physical layer of the other
processor, and up through the layers into the other processor application
layer and program
5.6TCP/IP Architecture
History
Many organizations were unable to wait for the completion of the OSI middle-
layer protocols during the 1980s. Vendors and users adopted the Transmission
Control Protocol/Internet Protocol (TCP/IP), which was developed for the United
States military Defense Advanced Research Projects Agency (DARPA) ARPANET
network. ARPANET was one of the first layered communications networks and
established the precedent for successful implementation of technology isolation
between functional components.
The TCP/IP protocol suite is now being used in many commercial applications. It
is particularly evident in internetworking between different LAN environments.
The TCP/IP
50
Client/Server Architecture
In fact, it has now become the de facto protocol for LAN-based Client/Server
connectivity and is supported on virtually every computing platform.
It is worth noting that IBM has followed this growth and not only provides support
for TCP/IP on all its platforms, but now enables the transport of its own
interoperability interfaces (such as CPIC, APPC) on TCP/IP.
TCP/IP's Architecture
1.Internet Protocol
2. Transport Protocols
51
Client/Server Architecture
3.Telnet
FTP uses TCP services to provide file transfer services to applications. FTP
includes a client and server portion. Server FTP listens for a session initiation
request from client FTP. Files may be transferred in either direction, or ASCII and
binary file transfer is supported. FTP provides a simple means to perform software
distribution to hosts, servers, and workstations.
The NFS protocol enables the use of IP by servers to share disk space and files the
same way a Novell or LAN Manager network server does. It is useful in
environments in which servers are running different operating systems. However,
it does not offer support for the same administration facilities that a NetWare
environment typically provides.
SMTP uses TCP connections to transfer text-oriented electronic mail among users
on the same host or among hosts over the network. Developments are under way
52
Client/Server Architecture
53
Client/Server Architecture
UNIT 6
CORBA
OMG was created in 1989. The OMG solicited input from all segments of the
industry and eventually defined the CORBA standards. OMG has been an
international, open membership, not-for-profit computer industry consortium since
1989. Any organization may join OMG and participate in standards-setting
process.
Distributed object systems are distributed systems in which all entities are
modeled as objects. Distributed object systems are a popular paradigm for object-
oriented distributed applications. Since the application is modeled as a set of
cooperating objects, it maps very naturally to the services of the distributed
system.
54
Client/Server Architecture
OR
CORBA is the acronym for Common Object Request Broker Architecture, OMG's
open, vendor-independent architecture and infrastructure that computer
applications use to work together over networks.
55
Client/Server Architecture
Thousands of sites rely on CORBA for enterprise, internet, and other computing.
The Object Management Group maintains an entire website devoted to user design
wins and success stories.
CORBA is useful in many situations. Because of the easy way that CORBA
integrates machines from so many vendors, with sizes ranging from mainframes
through minis and desktops to hand-helds and embedded systems, it is the
middleware of choice for large (and even not-so-large) enterprises.
One of its most important, as well most frequent, uses is in servers that must
handle large number of clients, at high hit rates, with high reliability.
CORBA works behind the scenes in the computer rooms of many of the world's
largest websites; ones that you probably use every day.
Specializations for scalability and fault-tolerance support these systems. But it's
not used just for large applications; specialized versions of CORBA run real-time
systems, and small embedded systems.
The ORB
• The ORB is the distributed service that implements the request to the
remote object. It locates the remote object on the network, communicates
the request to the object, waits for the results and when available
communicates those results back to the client.
• The ORB implements location transparency. Exactly the same request
mechanism is used by the client and the CORBA object regardless of where
the object is located. It might be in the same process with the client, down
the hall or across the planet. The client cannot tell the difference.
• The ORB implements programming language independence for the request.
The client issuing the request can be written in a different programming
language from the implementation of the CORBA object.
• The ORB does the necessary translation between programming languages.
Language bindings are defined for all popular programming languages.
CORBA Architecture
56
Client/Server Architecture
Fig 6.1.5
57
Client/Server Architecture
58
Client/Server Architecture
Typically, there are many instances of an object of a single type - for example, an
e-commerce website would have many shopping cart object instances, all identical
in functionality but differing in that each is assigned to a different customer, and
contains data representing the merchandise that its particular customer has
selected.
For other types, there may be only one instance. When a legacy application, such
as an accounting system, is wrapped in code with CORBA interfaces and opened
up to clients on the network, there is usually only one instance.
For each object type, such as the shopping cart that we just mentioned, you define
an interface in OMG IDL.
The interface is the syntax part of the contract that the server object offers to the
clients that invoke it. Any client that wants to invoke an operation on the object
must use this IDL interface to specify the operation it wants to perform, and to
marshal the arguments that it sends. When the invocation reaches the target object,
the same interface definition is used there to unmarshal the arguments so that the
object can perform the requested operation with them. The interface definition is
then used to marshal the results for their trip back, and to unmarshal them when
they reach their destination.
In contrast, the implementation of an object - its running code, and its data - is
hidden from the rest of the system (that is, encapsulated) behind a boundary that
the client may not cross.
Clients’ access objects only through their advertised interface, invoking only
those operations that that the object exposes through its IDL interface, with only
those parameters (input and output) that are included in the invocation.
59
Client/Server Architecture
Service Description
Object life cycle Defines how CORBA objects are created, removed,
moved, and copied
Naming Defines how CORBA objects can have friendly symbolic
names
Events Decouples the communication between distributed objects
Relationships Provides arbitrary typed n-ary relationships between
CORBA objects
Externalization Coordinates the transformation of CORBA objects to and
from external media
Transactions Coordinates atomic access to CORBA objects
Concurrency Control Provides a locking service for CORBA objects in order to
ensure serializable access
Property Supports the association of name-value pairs with
CORBA objects
Trader Supports the finding of CORBA objects based on
properties describing the service offered by the object
Query Supports queries on objects
It is a collection of services that many applications may share, but which are not as
fundamental as the Object Services. For instance, a system management or
electronic mail facility could be classified as a common facility.
60
Client/Server Architecture
So, "CORBA 2" sometimes refers to CORBA interoperability and the IIOP
protocol, and "CORBA 3" sometimes refers to the CORBA Component Model
CCM (even though the term CORBA 3 really refers to a suite of ten
specifications!).
It is your ticket to the distributed part of your application; it provides you with
ability to talk to services on a machine other than the client computer. In the past,
all the functionality was on the host machine and perhaps the database on the
server.
But with DCOM, you can now place actual functionality on the server and access
it almost as if they were local.
Benefits of DCOM
61
Client/Server Architecture
b. You can design and implement only the components’ interface and other
programmers can code to that interface.
c. When component s change, you can replace them once on a server
instead of on every client machine.
d. All clients get the update when the server-side component is in place.
The DCOM has some basic concept associated with it .They are
The COM components are created as an ActiveX DLL, which has the Classes your
program can access through the COM components.
The components are registered on the client system in the Windows Registry. The
Registry entries also give the picture on where exactly the DLL file is located on
the machine, so that it is loaded an executed.
The runtime system looks for the Registry entry of the component which we are
trying to create, if found it connects to the machine across the network an makes
the request.
62
Client/Server Architecture
In-process - components are running in the same process space as its applications,
they are built as DLL’s.
3. The Surrogate
There is an exception point between ActiveX EXE’s and DLL’s. We know that
EXE’s are out-of-process components and DLL’s are in-process ones. But when
writing components for Microsoft Transaction Server (MTS) or COM+, you need
to create DLL’s. This makes it difficult to create a multipurpose components that
can run in MTS or as stand-alone server-side , out-of-process components.
5.Marshaling
It is an important concept when dealing with DCOM. We know that when you
pass data from your application to a regular in-process COM component, the
component’s stack is used to store the parameters ; similar to the function call in
the application. But the same is not possible for the out-of-process DCOM
63
Client/Server Architecture
components; here we need different machines to move the data across the process
boundary. This mechanism is called as Marshaling.
The Marshaling works through a mechanism that user objects known as proxies
and stubs.
The proxy function is built into the client and a stub function is built into the
component. The proxy portion marshals the data and prepares it for shipment
across the process boundary to the component.
The stub function in the component unmarshals the data for use by the component.
64