Sie sind auf Seite 1von 42

What is Client/Server?

The name implies that clients and servers are separated logical entities that work together over a network to accomplish a task. Client/server is a computational architecture that involves client processes requesting service from server processes.

Client/server is a distributed computing model in which client applications request services from server processes. Clients and servers typically run on different computers interconnected by a computer network. A client application is a process or program that sends messages to a server via the network. Those messages request the server to perform a specic task, such as looking up a customer record in a database or returning a portion of a le on the servers hard disk. The client manages local resources such as a display, keyboard, local disks and other peripherals. The server process or program listens for client requests that are transmitted via the network. Servers receive those requests and perform actions such as database queries and reading les. Server processes typically run on powerful PCs, workstations or on mainframe computers. An example of a client/server system is a banking application that allows a clerk to access account information on a central database server. All access is done via a PC client providing a graphical user interface (GUI). An account number can be entered into the GUI along with how much money is to be withdrawn or deposited, respectively. The PC client validates the data input by the clerk, transmits the data to the database server, and displays the results that are returned by the server. The client/server model is an extension of the object-based (or modular) programming model, where large pieces of software are structured into smaller components that have well defined interfaces. Components interact by exchanging messages or by Remote Procedure Calling (RPC). The calling component becomes the client and the called component the server. This model creates the advantage of better maintainability and extensibility. A client/server environment typically hosts various operating system brands and hardware from multiple vendors. Vendor independence and freedom of choice are thus further advantages of the model. User friendly PC equipment can be interconnected with mainframe based servers, for example. Client/server systems can be scaled up in size more readily than centralized solutions as server functionality can be distributed across more and more server computers, as the number of clients increases. Server processes can thus run in parallel, each process serving its own set of clients. The drawbacks of the client/server model are that security is more difficult to ensure in a distributed environment than it is in a centralized one, that the administration of distributed equipment can be much more expensive than the maintenance of a centralized system, that data distributed across servers needs to be maintained consistent, and that the failure of one server can render a large client/server system unavailable. If a server fails, none of its clients can make progress any more. Furthermore, the computer network can become a performance or reliability bottleneck: if the network fails, all servers become unreachable. If one client produces a high network traffic then all clients will suffer from long response times. Client/server computing is the logical extension of modular programming. Modular programming has as its fundamental assumption that separation of a large piece of software into itsconstituent parts ("modules") creates` the possibility for easier development and better maintainability.Client/server computing takes this a step farther by recognizing that those modules need not all be executed within the same memory space. With this architecture, the calling module becomes the "client" (that which requests a service), and the called module becomes the "server" (that which provides the service).The logical extension of this is to have clients and servers running on the appropriate hardware and software platforms for their functions. For example, database management system servers

running on platforms specially designed and configured to perform queries, or file servers running on platforms with special elements for managing files. It is this latter perspective that has What is the function of Client? Client process: The client is a process or program that sends a message to a server process orprogram, requesting the server to perform a task or service. Client programs usually manage the user-interface portion of the application, validate dataentered by the user, dispatch requests to server programs, and sometimes execute business logic.The client-based process is the front-end of the application that the user sees and interacts with.The client process contains solution-specific logic and provides the interface between theuser and the rest of the application system. The client process also manages the local resources thatthe user interacts with such as the monitor, keyboard, workstation CPU and peripherals.One of the key elements of a client workstation is the graphical user interface (GUI). Normally a part of operating system i.e. the window manager detects user actions, manages thewindows on the display and displays the data in the windows. The client is a process that sends a message to a server process, requesting that the server perform a service. Client programs usually manage the user-interface portion of the application, validate data entered by the user, dispatch requests to server programs, and sometimes execute business logic. The client-based process is the front-end of the application that the user sees and interacts with. The client process often manages the local resources that the user interacts with such as the monitor, keyboard, CPU and peripherals. One of the key elements of a client workstation is the graphical user interface (GUI). Normally a par t of operating system i.e. the window manager detects user actions, manages the windows on the display and displays the data in the windows. What is the function of Server? Server programs generally receive requests from client programs, execute database retrieval and updates, manage data integrity and dispatch responses to client requests. The server-based process may run on another machine on the network. This server could be the host operating system or network file server, providing file system services and application services. The server process often manages shared resources such as databases, printers, communication links, or high powered processors. The server process performs the back-end tasks that are common to similar applications. Server process: A server process is a process or program that fulfills the client request by performingthe task requested. Server programs generally receive requests from client programs, execute database retrievaland updates, manage data integrity and dispatch responses to client requests. Sometimes server programs execute common or complex business logic.The server-based process may run on another machine on the network. This server could bethe host operating system or network file server; the server is then provided both file systemservices and application services. Or in some cases, another desktop machine provides theapplication services.The server process acts as a software engine that manages shared resources such asdatabases, printers, communication links, or high powered-processors. The server process performsthe back-end tasks that are common to similar applications.

All client/server systems have the following distinguishing characteristics. 1. 2. 3. 4. 5. 6. 7. 8. 9. 1. Service: Client/Server is primarily a relationship between processes running on separate machines The Server process is a provider of services. The client is a consumer of services. The client and server is separated clearly based on the idea of service. 2. Shared Resources: A server can service many clients at the same time and regulate their access to shared resources. Have different mechanisms in allocating files and hardware like printer, scanner etc. 3. Asymmetrical Protocols: There is a many-to-one relationship between clients and server Clients always initiate the dialog by requesting a service. Servers are passively awaiting requests from the clients. 4. Transparency of Location: The server is a process that can reside on the same machine as the client or on a different machine across a network. Client/Server software usually masks the location of the server from the clients by redirecting the service calls when needed. A program can be a client, a server or both. 5. Mix-and-Match: The ideal client/server software is independent of hardware or operating system Service Shared Resources Asymmetrical Protocols Transparency of location Mix and Match Message based exchanges Encapsulation of Services Scalability Integrity

You should able to mix and match the client and server platforms. 6. Message based exchanges: Clients and servers are loosely coupled systems that interact through a message-passing mechanism. The message is the delivery mechanism for the service requests and replies. 7. Encapsulation of Services: A message tells a server what service is requested; it is then up to the server to determine how to get the job done. Servers can be upgraded without affecting the clients as long as the published message interface is not changed. 8. Scalability: Client/Server systems can be scaled horizontally or vertically. Horizontal scaling means adding or removing client workstations with only a slight performance impact. Vertical scaling means migrating to a larger and faster server machine or multi-servers. 9. Integrity: The server code and data is centrally maintained, which results in cheaper maintenance and the guarding of shared data integrity. The clients remain personal and independent Cooperative Processing: Cooperative processing is computing which requires two or more distinct processorsto complete a single transaction. Cooperative processing is related to both distributed and client/server processing. It is aform of distributed computing where two or more distinct processes are required to complete asingle business transaction.Usually, these programs interact and execute concurrently on different processors.Cooperative process ing can also be considered to be a style of client/server processing if communication between processors is performed through a message passing architecture. Distributed Processing: Distributed processing is the distribution of applications and business logic acrossmultiple processing platforms. Distributed processing implies that processing will occur on more than one processor inorder for a transaction to be completed.In other words, processing is distributed across two or more machines and the processes aremost likely not running at the same time, i.e. each process performs part of an application in asequence. Often the data used in a distributed processing environment is also distributed across platforms. Client/Server Computing Era 1. Client Server Computing Era: Client/Server reshaped the way of computers being used. Client/Server become mandatory in all computer oriented fields Internet is a good example for the Client/Server concept.

1.1. What is the real client/server version?

A single PC can do all the work but the processes crowded up in the processor. Client/Server removes the host-centric pattern of execution. Processes which are hard to execute in PC can be send to the server. Client/Server is Computer glasnost means a new era of co-existence and openness in which all can play. Client/Server computing provides an open and flexible environment where mix and match is the rule. The client applications will run predominantly on PCs and other desktop machines that are at home on LANs. The successful servers know exactly how to communicate with their PC clients. Mainframe has dumb terminals. Under the client/server environment, the mainframe servers cant treat PCs as dumb terminals. They need to support peer-to-peer protocols, interpret PC messages, service their PC clients files in their native formats and provide data and services to PCs in the most direct manner.

1.2. Client/Server and the New IS Client/Server application development requires hybrid skills that include a) transaction processing b) database design c) communications experience and d) graphical user interface savvy. The more advanced applications require a knowledge of distributed objects and the internet. Most Client/Server solutions today are PC LAN implementations that are personalized for the group that uses them. Security requirements must be properly configured, often by the users themselves. IS departments have the skills to not only manage and deploy large networks but also to provide interoperability standards. They also know how to fine-tune applications, distribute fixes, and ensure data integrity. Client/Server computing may be best served by two-tiered IS organizations A line IS for managing and deploying departmental systems. An enterprise IS for managing global network and setting interoperability standards.

1.3. Competition in the Client/Server Market Client/Server is the great equalizer of the computer business, encourages openness. The open Client/Server environment serves as the catalyst for commoditizing hardware and system software. Example for commodity: PC can be obtained from multiple suppliers and is sold in very pricecompetitive market situations. LAN adapters, LAN protocol stacks, network routers, and bridges are also becoming commodities On the Software side, PC operating systems, SQL Database Management Systems and Web Servers and Browsers. The new era is beginning with Ubiquitous Client-Server Computing. Clients will be everywhere. They will come in all shapes and forms including desktop, palmtop, mobile etc.

1.4. The internet, intranet and extranet The Internet is a worldwide, publicly accessible series of interconnected computer networks that transmit data by packet switching using the standard Internet Protocol (IP). It is a network of networks that consists of millions of smaller domestic, academic, business, and government networks, which together carry various information and services, such as electronic mail, online chat, file transfer, and the interlinked web pages and other resources of the World Wide Web (WWW). An Intranet is a private computer network that uses internet protocols, network connectivity to securely share part of an organizations information or operations with its employees. Sometimes the term refers only to the most visible service, the internal website. The same concepts and technologies of the Internet such as clients and servers running on the Internet protocol suite are used to build an intranet. HTTP and other Internet protocols are commonly used as well, such

as FTP. There is often an attempt to use Internet technologies to provide new interfaces with corporate legacy data and information systems. Normally they hide behind the firewalls. An extranet is a private network that uses Internet protocols, network connectivity, and possibly the public telecommunication system to securely share part of an organizations information or operations with suppliers, vendors, partners, customers or other businesses. An extranet can be viewed as part of a companys Intranet that is extended to users outside the company (e.g.: normally over the Internet). It has also been described as a state of mind in which the Internet is perceived as a way to do business with a pre-approved set of other companies business-to-business (B2B), in isolation from all other Internet users. In contrast, business-to-consumer (B2C) involves known server(s) of one or more companies, communicating with previously unknown consumer users. Briefly, an extranet can be understood as a private intranet mapped onto the Internet or some other transmission system not accessible to the general public, but is managed by more than one companys administrator(s). Server Types 1. File Server 2. Database Server 3. Transaction Server 4. Groupware Server 5. Object Server 6. Web Server 1. File Servers The client passes requests for file records over a network to the file server. This is a very primitive form of data service. File Servers are useful for sharing files across a network. These are acting as a repository of documents, images, engineering drawings and other large data objects.

2. Database Servers The client passes SQL requests as messages to the database server. The result of each SQL command are returned over the network to the client. The code in the server process will processes the SQL request and the data reside in the same machine. Distributed database servers may increase the efficiency of the processing power. These servers provide the foundation for decision-support systems that require adhoc queries and flexible reports.

3. Transaction Servers The client invokes remote procedures that reside on the server with an SQL database engine. These remote procedures on the server execute a group of SQL statements. The network exchange consists of a single request/reply message. The SQL statements either all succeed or fail as a unit. These grouped SQL statements are called Transactions. The server component usually consists of SQL transactions against a database These are called Online Transaction Processing or OLTP. OLTP applications also require tight controls over the security and integrity of the database. Two forms of OLTP: based on the TP Monitors provided by the OLTP Vendors o TP Lite o TP Heavy

4. Groupware Servers Groupware addresses the management of semi-structured information such as text, image, mail, bulletin boards, and the flow of work. These client/server systems place people in direct contact with other people. Lotus Notes is the Leading Example. In most cases, applications are created using a scripting language and form-based interfaces provided by the vendor. The communication middleware between the client and the server is vendor-specific.

5. Object Servers The client/server application is written as a set of communicating objects. Client objects communicate with server objects using an Object Request Broker (ORB). The client invokes a method on a remote object. The ORB locates an instance of that object server class, invokes the requested method, and returns the results to the client object. Server objects must provide support for concurrency and sharing. The ORB brings it all together. Example: Digitals Object Broker, IBMs SOM 3.0, Suns NEO, HPs ORB Plus, Expersofts Power Broker, Microsofts DCOM or Network OLE.

6. Web Servers WWW is the first truly intergalactic client/server application. This model of client/server consists of thin, portable, universal clients that talk to Superfast Servers. The clients and servers communicate using an RPC-like protocol called HTTP. This protocol defines a simple set of commands, parameters are passed as strings. The collection of HTML documents are stored in the Web Server.

What do mean by Middleware? It is a standardized interfaces and protocols between clients and back-end databases. It hides complexity of data sources from the end-user Compatible with a range of client and server options All applications operate over a uniform applications programming interface (API).

Why is Client-Server Different? Emphasis on user-friendly client applications Focus on access to centralized databases Commitment to open and modular applications

Networking is fundamental to the organization

Characteristics of Client/Server Architectures 1. A combination of a client or front-end portion that interacts with the user, and a server or back-end portion that interacts with the shared resource. The client process contains solution-specific logic and provides the interface between the user and the rest of the application system. The server process acts as a software engine that manages shared resources such as databases, printers, modems, or high powered processors. The front-end task and back-end task have fundamentally different requirements for computing resources such as processor speeds, memory, disk speeds and capacities, and input/output devices. The environment is typically heterogeneous and multivendor. The hardware platform and operating system of client and server are not usually the same. Client and server processes communicate through a well-defined set of standard application program interfaces (APIs) and RPCs. An important characteristic of client-server systems is scalability. Horizontal scaling means adding or removing client workstations with only a slight performance impact.

2.

3. 4.

What are the issues in Client-Server Communication? Addressing Hard-wired address o Machine address and process address are known a priori Broadcast-based o Server chooses address from a sparse address space o Client broadcasts request o Can cache response for future Locate address via name server

Blocking versus non-blocking Blocking communication (synchronous) o Send blocks until message is actually sent o Receive blocks until message is actually received Non-blocking communication (asynchronous) o Send returns immediately o Return does not block either

Buffering Issues Unbuffered communication o Server must call receive before client can call send Buffered communication o Client send to a mailbox o Server receives from a mailbox

Reliability Unreliable channel o Need acknowledgements (ACKs) o Applications handle ACKs o ACKs for both request and reply Reliable channel o Reply acts as ACK for request o Explicit ACK for response Reliable communication on unreliable channels o Transport protocol handles lost messages

Server architecture Sequential o Serve one request at a time o Can service multiple requests by employing events and asynchronous communication Concurrent o Server spawns a process or thread to service each request o Can also use a pre-spawned pool of threads/processes (apache) Thus servers could be o Pure-sequential, event-based, thread-based, process-based

Scalability Buy bigger machine! Replicate Distribute data and/or algorithms Ship code instead of data Cache

Client-Server Pros & Cons Advantages Networked web of computers Inexpensive but powerful array of processors Open systems Grows easily Individual client operating systems Cost-effective way to support thousands of users Cheap hardware and software Provides control over access to data User remains in control over local environment Flexible access to information Disadvantages Maintenance nightmares Support tools lacking Retraining required Complexity Lack of Maturity Lack of trained developers Maintenance Cost Training Cost Hardware Cost Software Cost WHAT IS CLIENT/SERVER COMPUTING? According to MIS terminology, Client/Server computing is new technology that yields solutions to many data management problems faced by modern organizations. The term Client/Server is used to describe a computing model for the development of computerized systems. This model is based on distribution of functions between two types of independent and autonomous processes: Server and Client. A Client is any process that requests specific services from the server process. A Server is a process that provides requested services for the Client. Client and Server processes can reside in same computer or in different computers linked by a network. When Client and Server processes reside on two or more independent computers on a network, the Server can provide services for more than one Client. In addition, a client can request services from several servers on the network without regard to the location or the physical characteristics of the computer in which the Server

10

process resides. The network ties the server and client together, providing the medium through which the clients and the server communicate. The Fig. 1.1 given below shows a basic Client/Server computing model.

From the Fig. 1.1 it is clear that services can be provided by variety of computers in the network. The key point to Client/Server power is where the request processing takes place. For example: Client/Server Database. In case of Client/Server database system, the functionality is split between the server system and multiple clients such that networking of computers allows some tasks to be executed on the client system. Application Task

TYPES OF SERVERS A file server can store any type of data, and so on simpler systems, may be the only server necessary. On larger and more complicated systems, the server responsibility may be distributed among several different types of servers. In this section, we have discussed the purpose of various available server: File Server All the files reside on the server machine. File Server provides clients access to records within files from the server machine. File Servers are useful for sharing files across a network among the different client process requesting the services. The server process is somewhat primitive because of tends to demand many message exchanges over the network to find the requested data. The examples of File servers are: o UNIX: Network File Services (NFS) created by Sun Micro systems. o Microsoft Windows Map Drive e.g., Our Colleges Z-drive. o Samba: An open Source/Free Software suite that provides seamless file and print services to SMB/CIFS clients (i.e., Microsoft Windows clients). Print Server This machine manages user access to the shared output devices, such as printers. These are the earliest type of servers. Print services can run on a file server or on one or more separate print server machines. Application Server This machine manages access to centralized application software; for example, a shared database. When the user requests information from the database, the application server processes the request and returns the result of the process to the user. Mail Server This machine manages the flow of electronic mail, messaging, and communication with mainframe systems on large-scale networks. Fax Server

11

Provides the facility to send and receive the Faxes through a single network connection. The Fax server can be a workstation with an installed FAX board and special software or a specialized device dedicated and designed for Fax Services. This machine manages flow of fax information to and from the network. It is similar to the mail server. Directory Services Server It is found on large-scale systems with data that is distributed throughout multiple servers. This machine functions as an organization manager, keeping track of what is stored where, enabling fast and reliable access to data in various locations. Web Server This machine stores and retrieves Internet (and intranet) data for the enterprise. Some documents, data, etc., reside on web servers. Web application provides access to documents and other data. Thin clients typically use a web browser to request those documents. Such servers shares documents across intranets, or across the Internet (or extranets). The most commonly used protocol is HTTP (Hyper Text Transfer Protocol). Web application servers are now augmenting simple web servers. The examples of web application servers are Microsofts Internet Information Server (IIS), Netscapes iPlanet IBMs WebSphere, BEAs WebLogic and Oracle Application Server. Database Server Data resides on server, in the form of a SQL database. Database server provides access to data to clients, in response to SQL requests. It shares the data residing in a database across a network. Database Server has more efficient protocol than File Server. The Database Server receives SQL requests and processes them and returning only the requested data; therefore the client doesnt have to deal with irrelevant data. However, the client does have to implement SQL application code. The example of database server is: Oracle9i database server. Transaction Servers The data and remote procedures reside on the server. The Server provides access to high-level functions, and implements efficient transaction processing. It shares data and high-level functions across a network. Transaction servers are often used to implement Online Transaction Processing (OLTP) in high-performance applications. A transaction server utilizes a more efficient protocol in comparison to a Database Server. The transaction Server receives high-level function request from the clients and it implements that function. Often it needs to return less information to the client than a Database Server. Examples of the Transaction servers mainly categorized as o TP-Light with Database Stored Procedures like Oracle, Microsoft SQL Server etc. o TP-Heavy with TP Monitors like BEA Tuxedo, IBM CICS/TX Series. Groupware Servers Liable to store semi-structured information like text, image, mail, bulletin boards, flow of work. Groupware Server provides services, which put people in contact with other people, that is because groupware is an ill-defined classification protocol differing from product to product. For Example: Lotus Notes/Domino and Microsoft Exchange. Object Application Servers Communicating distributed objects reside on the server. The object server primarily provides access to those objects from the designated client objects. The object Application Servers are responsible for sharing distributed objects across the network. Object Application Servers use the protocols that are usually some kind of Object Request Broker (ORB). Each distributed object can have one or more remote methods. ORB locates an instance of the object server class, invokes the requested method, and returns the results to the client object. Object Application Server provides an ORB and application servers to implement this. For example: Common Object Request Broker Architecture (CORBA): Ionas Orbix, Borlands Visibroker. Microsofts Distributed Component Object Model (DCOM), aka COM+. Microsoft Transaction Server (MTS).

12

COMPONENTS OF CLIENT SERVER

Components of client server


a client, a server, and middleware
eq ue st

Client

Server
R

middleware
es ul t

Client machine

Server machine

Client process The client is a process (program) that sends a message to a server process (program), requesting that the server perform a task (service). Client programs usually manage the user-interface portion of the application, validate data entered by the user, dispatch requests to server programs, and sometimes execute business logic. The client-based process is the front- end of the application that the user sees and interacts with. The client process contains solutionspecific logic and provides the interface between the user and the rest of the application system. The client process also manages the local resources that the user interacts with such as the monitor, keyboard, workstation CPU and peripherals. One of the key elements of a client workstation is the graphical user interface (GUI). Normally a part of operating system i.e. the window manager detects user actions, manages the windows on the display and displays the data in the windows.

13

Server process A server process (program) fulfills the client request by performing the task requested. Server programs generally receive requests from client programs, execute database retrieval and updates, and manage data integrity and dispatch responses to client requests. Sometimes server programs execute common or complex business logic. The server-based process "may" run on another machine on the network. This server could be the host operating system or network file server; the server is then provided both file system services and application services. Or in some cases, another desktop machine provides the application services. The server process acts as a software engine that manages shared resources such as databases, printers, communication links, or high powered-processors. The server process performs the back-end tasks that are common to similar applications.

14

Examples A common client/server example is a print server. Most people have probably noticed a temporary lockup or slowdown when a document is printed on a stand-alone PC, especially if the document is complex. One can attach a printer to a PC and then share it with other users across the network. However, if everyone on the network simultaneously prints to that shared printer, it would likely lock up or even crash. Therefore, many times a machine is dedicated solely to handle printing a print server. It "serves" print requests to all users, and off-loads this task from local machines. Another example is a mail server which functions much like a post office, receiving mail centrally and delivering individual messages to individual clients. In a small organization, a single server machine may serve more than one function, if the functions are simple enough. One or more applications may reside on a single server machine, with the server being divided into different "logical" partitions. In a large corporate environment, there may be many servers for separate tasks. There is typically a primary domain controller (PDC), which authenticates users and controls access and log in to the computer system itself. There may be a mail server, which processes e-mail. There may also be a file server typically containing large disk drives and individual user directories to store user files in a uniform way. And there may be separate application servers for accounting, billing, customer care, Web, e-commerce, database, transaction, manufacturing, inventory, etc. They are typically linked together using integration software (frequently called middleware) so that one can access many server applications from a single (client) machine, through a common interface, typically a browser. CLIENT/SERVER MODELS: Client/server systems can be classified based on the way in which the systems have been built. The most widely accepted range of classifications has come from the Gartner Group, a market research firm in Stamford, Connecticut {see Figure 1.1). Although your system will differ slightly in terms of design, these models give you a good idea of how client/server systems can be built. These models are not, however, mutually exclusive, and most good systems will use several of these styles to be effective and efficient. Over time, client/server systems may move models as the applications are replaced or enhanced. These models demonstrate that a full definition of a client/server system is a system in which a client issues requests and receives work done by one or more servers. The more server statement is important because the client may need to access several distinctly separate network systems or hosts. The following sections describe each of the five basic models. In its simplest form, client/server identifies a system whereby a client issues a request to a second machine called the server asking that a piece of work is done. The client is typically

15

a personal computer attached to a LAN, and the server is usually a host machine such as a PC fileserver, UNIX file server, or midrange/mainframe.

Gartner Group Model The job requests can include a variety of tasks, including, for example: Return all records from the customer file database where name of Customer = Holly Store this file in a specific file server data directory Attach to CompuServe and retrieve these items Upload this data packet to the corporate mainframeTo enhance this definition you should also consider the additional requirements that a nessnormally has. Model 1: Distributed Presentation Distributed presentation means that both the client and the server machines format thedisplay presented to the end user. The client machine intercepts display output from the server intended for a display device and reroutes the output through its own processes before present-ing it to the user.As below figure shows, the easiest model is to provide terminal emulation on the clientalongside other applications. This approach is very easy to implement using products such asWallData's Rumba or Attachmate but provides no real business benefit other than to begin amigration to client/server. Sometimes a company may use a more advanced form of terminalemulation whereby they hide the emulation screen and copy some of its contents, normally keyfields, onto a Visual Basic or Borland Delphi screen. This copying is often referred to as screenscraping. Screen scraping enables a company to hide its mainframe and midrange screens and present them under a PC interface such as Windows or OS/2. The major benefit of screenscraping is that it allows a system to migrate from an old mainframe-based system to a newclient/server system in small incremental steps. Model 2: Remote Presentation It may be necessary to move some of the application's program logic to the PC from thehost computer. The second model, as shown in the below figure , allows for some business/program logic as well as t he presentation to reside on the PC. This model is particularly useful when moving from a dumb terminal environment to a PC-LAN environment.The logic can be of any type; however, validation of fields, such as ensuring that states and zipcodes are valid, are ideal types of logic Model 3: Distributed Logic A distributed logic client/server application splits the logic of the application between theclient and server processes. Typically, an event-driven GUI application on the client controls theapplication flow, and logic on the server centrally executes the business and database rules. Theclient and server processes can communicate using a variety of middleware tools, including APPC,Remote Procedure Calls (RPC), or data queues.Differentiating between the remote presentation and distributed logic models isn't alwayseasy. For example, if a remote presentation application performs some calculations with the data itreceives, does it therefore become a distributed logic application? This overlap between the modelscan sometimes make the models confusing. The following figure shows the distributed logic client/server model Model 4: Remote Data

16

With the remote data model, the client handles all the application logic and end-user presen-tation, and the server provides only the data. Clients typically use remote SQL or Open DatabaseConnectivity (ODBC) to access the data stored on the server. Applications built in this way arecurrently the most common in use today. The below figure shows this model Model 5: Distributed Data Finally, the distributed data model uses data distributed across multiple networked systems.Data sources may be distributed between the client and the server or multiple servers. Thedistributed data model requires an advanced data management scheme to enforce data concurrency,security, and integrity across multiple platforms. As you would expect, this model is the mostdifficult client/server model to use. It is complex and requires a great deal of planning and decision-making to use effectively. The following figure shows this model MIDDLWARE Middleware is used to glue together applications or components. A few examples of middleware include: IPC by sockets, shared memory TCP/IP, X.25 Common database RPC, CORBA RMI MOM

Connectivity allows applications to transparently communicate with other programs or processes, regardless of their location. The key element of connectivity is the network operatingsystem (NOS). NOS provides services such as routing, distribution, messaging, file and print,and network management services. NOS rely on communication protocols to provide specific services. The protocols are divided into three groups: 1.Media protocols, 2.Transport protocols and 3.Client-server protocols Media protocols determine the type of physical connections used on a network. Someexamples of media protocols are Ethernet, Token Ring, Fiber Distributed Data Interface (FDDI),coaxial and twisted-pair. A transport protocol provides the mechanism to move packets of data from client toserver. Some examples of transport protocols are Novell's IPX/SPX, Apple's AppleTalk,Transmission Control Protoco l/ Internet Protocol (TCP/IP), Open Systems Interconnection(OSI) and Government Open Systems Interconnection Profile (GOSIP)).Once the physical connection has been established and transport protocols chosen, aclient-server protocol is required before the user can access the network services. A client-server protocol dictates the manner in which clients request information and services from a server and also how the server replies to that request. Some examples of clienserver protocols are NetBIOS, RPC, Advanced Progr am-to-Program Communication (APPC), Named Pipes,Sockets, Transport Level Interface (TLI) and Sequenced Packet Exchange (SPX). Types of Middleware: 1. Remote Procedure Calls (RPC) client makes calls to procedures running on remote computers synchronous and asynchronous 2. Message-Oriented Middleware (MOM) asynchronous calls between the client via message queues 3. Publish/Subscribe push technology server sends information to client when available 4. Object Request Broker (ORB)

17

object-oriented management of communications between clients and servers 5. SQL-oriented Data Access middleware between applications and database servers Database Middleware: 1.ODBCOpen Database Connectivity Most DB vendors support this 2.OLE-DB Microsoft enhancement of ODBC 3.JDBCJava Database Connectivity Special Java classes that allow Java applications/applets to connect to databases s with peer-to-peer connectivity without regard for the underlyingcommunications transport (i.e. TCP/IP, NetBIOS, Async).Piccolo is supported on UNIX versions AIX, SCO, HP-UX (HP9000/700 & 800),Tandem S2 Integrity, Solaris 2.1, and Silicon Graphics (SGI). It is also supported on Windows3.x, Windows NT, and the Tandem Non-Stop Kernel. Application developers use the PiccoloAPI to access data and applications residing on any of the supported platforms on a network.The developers need no programming knowledge of the underlying transport protocol. 3.PIPES Platform: PIPES Platform, from Peer Logic, is message-oriented middleware that provides theessential communications services for distributing applications across the enterprise. PIPES Platform's process-to process messaging allows development of applications with an asynchronous, non-blocking, event-driven architecture. A dynamic name service lets us find a trun-time and communicate with any application resource in the PIPES Platform network. PIPESPlatform automatically maintains information on all PIPES Platform resources, even asmachines and applications are added or moved. Session management services provideguaranteed message delivery, integrity, prioritization, sequencing, dynamic re-routing and error handling. PIPES Platform's cross platform and multiprotocol support provide a consistent communications interface that allows developers to focus on business logic, not communications. 4.SmartSockets: SmartSockets, from Talarian Corporation, is a rapid application development toolkitwhich enables processes to communicate quickly, reliably, and securely across differentoperating system platforms, through the use of messages. The communicating processes canreside on the same machine, on a LAN, on a WAN, or anywhere on the Internet.SmartSockets is an industrial-strength package which takes care of network interfaces,guarantees delivery of messages, handles communication protocols, and deals with recoveryafter system/network failures. SmartSockets's programming model is built specifically to offer high-speed inter process communication, scalability, reliability and fault tolerance. It supports a variety of communication paradigms including publish-subscribe, peer-to- peer, and RPC. Included as part of the package are graphical tools for monitoring and debuggingour application. SmartSockets is available on most UNIX, OpenVMS, Windows 3.1, Windows95, Windows NT, and OS/2. The term middleware is used to describe separate products that serve as the glue between two applications. Middleware is sometimes called plumbing because it connects two sides of an application and passes data between them. Common middleware categories include: TP monitors DCE environments RPC systems Object Request Brokers (ORBs) Database access systems Message Passing

Middleware is software that functions as a conversion or translation layer. It is also a consolidator and integrator. Custom-programmed middleware solutions have been developed for decades to enable one application to communicate with another that either runs on a different platform or comes from a different vendor or both. Today, there is a diverse group of products that offer packaged middleware solutions What is Middleware? Middleware does not include the software that provides the actual service thats in the servers domain.

18

It also does not include the user interface or the applications logic thats in the clients domain. It starts with the API set on the client side that is used to invoke a service, and it covers the transmission of the request over the network and the resulting response. Middleware divided into two broad classes: (a) General Middleware (b) Service-Specific Middleware (a) General Middleware It is the substrate for most client/server interactions It includes the communication stacks, distributed directories, authentication stacks, distributed directories, authentication services, network time, remote procedure calls, and queuing services. Products that fall into the general middleware category include DCE, ONC+, NetWare, NamedPipes, LAN Server, LAN Manager, Vines, TCP/IP, APPC and NetBIOS. Message Oriented Middleware (MOM) products from Peerlogic, Covia, Message Express, System Strategies and IBM. These are depends on message queue system and increases portability, interoperability, flexibility. (b) Service-Specific Middleware It is need to accomplish a particular client/server type of service. This includes o Database-specific middleware such as ODBC, DRDA, EDA/SQL, SAG/CLI and Oracle Glue. o OLTP-specific middleware such as Tuxedos ATMI and /WS, Encinas Transactional RPC, and X/Opens TxRPC and XATMI o Groupware-specific middleware such as MAPI, VIM, VIC, SMTP and Lotus Notes Calls o Object-specific middleware such as OMGs CORBA and Microsofts Network OLE (or DCOM) o Internet-specific middleware such as HTTP, S-HTTP and SSL o System Management-specific middleware such as SNMP, CMIP and ORBs.

19

MOM Vs RPC Feature Metaphor Client/Server relationship MOM Post-office like RPC Telephone like

time Asynchronous. Clients andSynchronous. Clients and Servers Servers may operate at differentmust run concurrently. Servers times and speeds must keep up with clients. Servers must first come up before clients can talk to them. Call-Return Yes

Client/Server Sequencing No fixed sequence

Style Partners available need to

Queued be No

Load-balancing

Single queue can be used toRequires a separate TP Monitor. implement FIFO or priority based policy Yes (Some Products) MessageNo. Requires a Transactional Queue can participate in theRPC. commit synchronization Yes No

Transactional Support

Message Filtering Performance

Slow. An intermediate hop isFast required

Asynchronous processing Yes. Queues and triggers areLimited. Requires threads and required tricky code for managing threads. Messaging and Queuing : The MOM Middleware MOM is a key piece of middleware that is absolutely essential for a class of client/server products. If the application can tolerate a certain level of time-independent responses, MOM provides the easiest path for creating enterprise and inter-enterprise client/server systems. This accumulates outgoing transactions in queue and do a bulk upload when a connection can be established with an office server. MOM allows general purpose messages to be exchanged in a client/server system using message queues. Applications communicate over networks by simply putting messages in queues and getting messages from queues. MOM hides all the nasty communications from applications and typically provides a very simple high-level of API to its services. A MOM consortium was formed in mid-1993 with the goal of creating standards for messaging middleware. Members are product providers including o IBM MQSeries o Covia Communications Integrator o Peerlogic PIPES o Horizon Strategies Message Express o System Strategies ezBridge

20

MOMs messaging and queuing allows clients and servers to communicate across a network without being linked by a private, dedicated, logical connection. The clients and servers can run at different times. Everybody communicates by putting messages on queues and by taking messages from queues.

MOM products provide their own NOS services including hierarchical naming, security, and a layer that isolates applications from the network. They use virtual memory on the local OS to create their queues. Most messaging products allow the sender to specify the name of the reply queue. The products also include some type of format field that tells the recipient how to interpret the message data. MOM enabled programs do not talk to each other directly, so either program can be busy, unavailable, or simply not running at the same time. The target program can even be started several hours later.

Many clients are sending requests to one server queue. The messages are picked off the queue by multiple instances of the server program that are concurrently servicing the clients. The server instances can take messages off the queue either on a FIFO basis or accounting to some priority to load-balancing scheme. The message queue can be concurrently accessed. The servers can also use messaging filters to throw away the messages they dont want to process, or they can pass them on to other servers. The MOM messaging products provide persistent (logged on disk) and non-persistent (in memory) message queues. Persistent messages are slower, that they can be recovered in case of power failures after a system restart. A message queue can be local to the machine or remote. System administrators can usually specify the number of messages a queue can hold and the maximum message size.

21

Remote Procedure Call RPCs are not procedure calls at all, they are truly process invocations. The invoked program runs across the wire in a different resource domain A client process calls a function on a remote server and suspends itself until it gets back the results. Parameters are passed like in any ordinary procedure. The RPC, like an ordinary procedure is synchronous. The process (or threads) that issue the call waits until it gets the results. Under the covers, the RPC run-time software collects values for the parameters, forms a message, and sends it to the remote server. The server receives the request, unpacks the parameters, calls the procedure, and sends the reply back to the client. While RPCs make life easier for the programmer, they pose a challenge for the NOS designers who supply the development tools and run-time environments. The Common issues are: How are the Server functions located and started? Server starts the process, when a remote invocation is received with necessary parameters and returns the response to the client. What happens when multiple clients invoke the same function? Now an environment is needed to start and stop servers, prioritize requests, perform security checks, and provide some form of load-balancing. Each incoming requests invokes a thread in the server side. A server loop is created to manage the pool of threads waiting for work rather than create a thread for each incoming request. TP Monitors are really need on the server side, which provides more functions than a NOS. How are parameters defined and passed between the client and the server? The better NOSs provide an Interface Definition Language (IDL) for describing the functions and parameters that a server exports to its clients. An IDL compiler takes these descriptions and produces source code stubs (and header files) for both the client and server. These stubs can then be linked with the client and server code. The client stubs packages the parameters in an RPC packet, converts the data, calls the RPC run-time library and waits for the servers reply. On the server side, the server stubs unpacks the parameters, calls the remote procedure, packages the results, and sends the reply to the client.

22

How are failures handled? Both the sides of the RPC can fail separately, it is important for the software to be able to handle all the possible failure combinations. If the server does not respond, the client side will normally block, timeout, and retry the call. The server side must guarantee only once semantics to make sure that a duplicate request is not re-executed. If the client unexpectedly dies after issuing a request, the server must be able to undo the effects of that transition. How is security handled by the RPC? Modern NOSs, like DCE make it easy to automatically incorporate their security features into the RPC. All you need to specify is the level of security required; then the RPC and security feature will cooperate to make it happen. How does the client find its server? The association of a client with a server is called binding. The binding information may be hardcoded in the client. The client can find its server by consulting a configuration file or an environment parameter. A client can also find its server at run time through the network directory services. The server must, of course, advertise their services in the directory. The process of using the directory to find a server at runtime is called dynamic binding RPC can be used to find a server. The RPC client stub will locate a server from a list of servers that support the interface. This is called automatic binding.

23

How is data representation across systems handled? The problem here is that different CPUs represent data structures differently (Ex: bigendian Vs little endian) To maintain machine independence, the RPC must provide some level of data format translation across systems. Example: Sun RPC requires that clients convert their data to a neutral canonical format using the External Data Representation (XDR) APIs. In contrast, DCEs Network Data Representation (NDR) service is multicanonical, meaning that it supports multiple data format representations. The client chooses one of these formats, tags the data with chosen format, and then leaves it up to the server to transform the data into a format it understands. In other words, the server makes it right. It lets the client to do translation, which makes the life easy for the server. With Sun, all clients look the same to the server: The Client makes it right. Datagrams Vs Sessions Connection-oriented protocols also known as session-based protocols, virtual circuits or sequenced packet exchanges provide a reliable two-way connection service over a session. Each packet of information gets exchanged over a session. Duplicate packets are detected and discarded by the session services. Overhead associated with creating and managing the session. If a session is lost, one of the parties must reestablish it. This can be a problem for fault-tolerant servers that require automatic switch overs to a backup server if the primary server fails. The backup server needs to reestablish all the outstanding sessions with clients. Datagrams also known as connectionless protocols or transmits and pray protocols provide a simple but unreliable form of exchange. The more powerful datagram protocols such as NetBIOS provide broadcast capabilities. NetBIOS allows you to send datagrams to a named entity, to a select group of entities (multicast), or to all entities on a network (broadcast). Datagrams are unreliable in the sense that they are not acknowledged or tracked through a sequence number. Some stacks (ex: LAN Servers MailSlots) provide an acknowledged datagram service. Datagrams are very useful to have in discovery types of situations. These are situations where you discover things about your network environment by broadcasting queries and learning who is out there from the response. Broadcast can be used to obtain bids for services or to advertise the avilability of new services. Broadcast datagrams provide the capability of creating electronic bazaars The alternative to broadcast is to use a network directory service. Datagrams are also very useful in situations where there is a need to send a quick message (or) important message. Ex: All the systems have to send the I am alive message periodically to the network manager. o The ordinary method may need 500 sessions for each computer in the network and not possible. o Instead the system can broadcast the datagram to the manager. Peer to Peer Communications Most early client/server applications were implemented using low-level, conversational, peer-to-peer protocols such as sockets, TLI, CPIC/APPC, NetBIOS and Named Pipes. These low-level protocols are hard to code and maintain. Instead now, the programmers are using RPCs, MOMs, and ORBs, which provide high level abstraction. The term, peer-to-peer indicates that the two sides of a communication link use the same protocol interface to conduct a networked conversation. The protocol is symmetrical, and it is sometimes called program-to-program. The peer-to-peer interface not fully mask the underlying network from the programmer. Programmer have to handle the transmission timeouts, race conditions, and other network errors. The peer-to-peer protocols started as stack-specific APIs. a) Sockets

24

Sockets were introduced in 1981 as the UNIX BSD 4.2 generic interface that would provide Unix-to-Unix communications over network. In 1985, SUN OS introduced NFS and RPC over sockets. Sockets are supported on virtually every OS. The windows socket API, known as WinSock, is a multivendor specification that standardizes the use of TCP/IP under windows. In BSD Unix System, sockets are part of the Kernel and provide both a standalone and networked IPC service. Socket = Net_ID . Host_ID . Port_ID = IP Address + Port Address. The three most popular socket types are o Stream o Datagram o Raw Stream and datagram sockets interface to the TCP and UDP protocols, and raw sockets interface to the IP protocol. A port is an entry point to an application that resides on the host. It is represented by a 16-bit integer. Ports are commonly used to define the entry points for services provided by the server applications. b) TLI In 1986, AT&T introduced the Transport Layer Interface that provides functionality similar to sockets but in a more network-independent fashion. Sockets and TLI are very similar from a programmers perspective. TLI is just cleaner version of the sockets. It should run on IPX/SPX (or) TCP/IP with very few modifications. The TLI API consists of 25 API calls. Later standardized as XTI, X/Open Transport Interface. c) NetBIOS: It is the premier protocol for LAN-based, program-to-program communications. Introduced by IBM and Sytek in 1984 for the IBM PC network. It is used as an interface to a variety of stacks including NetBEUI, TCP/IP, XNS, Vines, OSI and IPX/SPX. The NetBIOS services are provided through a set of commands, specified in a structure called the Network Control Block (NCB) It does not support the routing of messages to other networks. d) Named Pipes: Provide highly reliable, two-way communications between clients and a server. They provide a file-like programming API that abstracts a session-based two-way exchange of data. Using named pipes, processes can exchange data as if they were writing to, or reading from, a sequential file. These are suitable for implementing server programs that require many-to-one pipelines. Important benefit of named pipes are part of the base interprocess communications service. Named pipes interface is identical, whether the processes are running on an individual machine or distributed across the network. Named pipes run on NetBIOS, IPX/SPX, and TCP/IP stacks. Named pipes are built-in networking features in Windows NT, Windows for Workgroups, Windows 95 and Warp Server. Unix support for Named Pipes is provided by LAN Manager/X. e) CPI-C/APPC:

25

Common Programming Interface for Communications (CPI-C) build on top of APPC and marks its complexities and irregularities. Writing to the CPI-C API allows you to port your programs to all SNA platforms. The CPI-C API consists of about 40 calls; APPC consists of over 60 calls. Most of these calls deals with configuration and services. Advanced program-to-program communication is a protocol which computer programs can use to communicate over a network. APPC was developed as a component of IBMs Systems Network Architecture (SNA). APPC is linked with the term LU6.2. LU6.2. (Logic Unit Version 6.2) is a device independent SNA Protocol. It was developed to allow computers in IBM environments to setup their own communications sessions, rather than rely on a hos computer to do so. Contrary to TCP/IP, in which both communication partners always possess a clear role, the communication partners in APPC are equal, i.e., everyone can be both servers and clients equally. With the wide success of TCP/IP, APPC has declined.

RPC, Messaging and Peer to Peer Client/Server applications are split across address spaces, physical machines, networks and operating systems. All NOSs offer peer-to-peer interfaces that let applications communicate using close to the wire send/receive semantics. Most NOSs provide some form of RPC middleware that hides the wire. An alternative type of model message queueing or simple MOM incredibly helpful in situations when the tight synchronization is not needed between the clients and servers. Communication Stacks RPC Named Pipes Presentation Session Peer-to-peer service API NetBIOS Sockets TLI CPI-C/APPC Common Transport Semantics Transport Network LLC MAC NDIS (OR) ODI NetBEUI TCP/IP IEEE802.2 SPX/IPX LU6.2 /APPN DCE NDR SUN XDR

Application

Messaging

Peer-to-Peer

26

IEEE 802.5 Ring) Physical Fiber Optic

(Token

IEEE 802.3 (Ethernet) Coax

SDLC

ISDN Twisted Pair

Each layer has a well-defined set of APIs and Protocols. With these mix-and-match can be done. Practically, an entire stack of from a single vendor. The lowest layer of the communication software belongs to the device drivers that provide an interface to several types of communication hardware adapters. Real products dont have any notion of architectural boundaries or reference models they just get a job done. At the lower layers, they interface to the hardware using MAC protocols defined by IEEE. The LLC provides a common interface to the MACs and a reliable link service for transmitting communication packets between two nodes. The transport layer provides end-to-end delivery service. Inside the Building Blocks

The Client Building Block Runs the client side of the application It runs on the OS that provides a GUI or an OOUI and that can access distributed services, wherever they may be. The client also runs a component of the Distributed System Management (DSM) element. The Server Building Block Runs the server side of the application The server application typically runs on top of some shrink-wrapped server software package. The five contending server platforms for creating the next generation of client/server applications are SQL database severs, TP Monitors, groupware servers, Object servers and the Web server. The server side depends on the OS to interface with the middleware building block. The server also runs DSM component It may be a simple agent or a shared object database etc. The Middleware Building Block Runs on both the client and server sides of an application This broken into three category o Transport Stacks

27

o NOS o Service-specific middleware Middleware is the nervous system of the client/server infrastructure This also has the DSM component DSM Runs on every node in the client/server network. A managing workstation collects information from all its agents on the network and displays it graphically. The managing workstation can also instruct its agents to perform actions on its behalf. Server-to-server Middleware Server-to-server interactions are usually client/server in nature servers are clients to other servers. However, some server-to-server interactions require specialized server middleware. For example, Two-Phase commit protocol may be used to coordinate a transaction that executes on multiple servers. Servers on mail backbone will use special server-to-server middleware for doing store-and-forward type messaging. But most modern software follows the client/server paradigm.

Client/Server : A one size fits all model The building blocks of client/server applications are: 1. Client 2. Middleware 3. Server

These building blocks can be rearranged to use them in the following situations:

28

1. Client/Server for tiny shops and nomadic tribes This is a building-block implementation that runs the client, the middleware software, and most of the business services on the same machine. It is the suggested implementation for the one-person shops, home offices, and mobile users with well-endowed laptops. 2. Client/Server for small shops and departments - This is the classic Ethernet client/single-server, building block implementation. It is used in small shops, departments, and branch offices. This is the predominant form of client/server today. 3. Client/Server for intergalactic enterprises This is the multiserver building-block implementation of client/server. The servers present a single system image to the client. They can be spread out throughout the enterprise, but they can be made to look like they are part of the local desktop. This implementation meets the initial needs of intergalactic client/server computing. 4. Client/Server for a post-scarcity world This model transforms every machine in the world into both a client and a server. Personal agents on every machine will handle all the negotiations with their peer agents anywhere in the universe. This dream is almost within reach. 1) Client/Server for Tiny Shops and Nomadic Tribes It is easy to run the client and server portion of an application on the same machine. Vendors can easily package single-user versions of a client/server application. The business critical client/server application runs on one machine and does some occasional communications with outside servers to exchange data, refresh a database and send or receive mail and faxes. Ex: Internet.

2) Client/Server for small shops and departments The client/server architecture is particularly well-suited for the LAN-based single server establishments. It consists of multiple clients talking to a local server. This is the model used in small businesses. The single-server nature of the model tends to keep the middleware simple. The client only needs to look into a configuration file to find its servers name. Security is implemented at the machine level and kept quite simple. The network is usually relatively easy to administer; its a part-time job for a member of the group. There are no complex interactions between servers, so it is easy to identify failures- theyre either on the client or on the local server.

29

3) Client/Server for Intergalactic Enterprises: The client/server enterprise model addresses the needs of establishments with a mix of heterogeneous servers. These models are upwardly scalable. When more processing power is needed for various intergalactic functions, more servers can be added, or the existing server machine can be traded up for the latest generation of superserver machine. The servers can be partitioned based on the function they provide, the resource they control, or the database they own. The servers can be replicated to provide a fault-tolerant service or to boost an applications performance. Multiserver capability, when properly used, can provide an awesome amount of compute power and flexibility, in many cases rivaling that of mainframes. To exploit the full power of multiservers, we need low-cost, high-speed bandwidth and an awesome amount of middleware features -including o network directory services o network security o remote procedure calls and o network time services. Middleware creates a common view of all the services on the network called a single system image. Good software architecture for intergalactic enterprise client/server implementations is all about creating system ensembles out of modular building blocks. Intergalactic client/server is the driving force behind middleware standards as distributed objects and the Internet.

4) Client/Server for a Post-Scarcity World Every machine is both a client and a full-function server. Because every machine is a full-function server, it will run, at a minimum, a file server, database server, workflow agent, TP Monitor, and Web server all connected via an ORB. This is in addition to all the client software and middleware. In next few years, a hundred million machines or more may be running almost all the forms of client/server software In this model instead of mobile agents, personal agents will be used.

30

Intergalactic Client/Server Intergalactic client/server is a new threshold of client/server applications and this is because of 1. the exponential increase of low-cost bandwidth on Wide Area Networks for example, the Internet and CompuServe 2. a new generation of network-enabled, multi-threaded desktop operating systems for example, OS/2 Warp Connect and Windows 95. This new threshold marks the beginning of a transition from Ethernet client/server tointergalactic client/server that will result in the irrelevance of proximity. The center of gravity is shifting from single-server, 2-tier, LAN-based departmental client/server to a post-scarcity form of client/server where every machine on the global information highway can be both a client and a server. Application characteristics Number of clients per application Number of servers per application Geography Server-to-server Interactions Middleware Client/server architecture Transactional updates Multimedia content Mobile Agents Client front-ends Time-frame Intergalactic Era client/server Millions 100,000+ Ethernet Era client/server Less than 100 <5

Global Campus-based Yes No ORBs on top of Internet SQL and stored procedure 3-tier (or n-tier) 2-tier Pervasive Very infrequent High Low Yes No OOUIs, compound documents,GUI and shippable places 1997 onwards 1985 till present

The major key technologies in intergalactic client/server model are: a) Rich transaction Processing supports the nested transactions that span across multiple servers, long-lived transactions that executes over long periods of time as they travel from server to server, and queued transactions that can be used in secure business-to-business dealings. Most nodes on the network participates in the secured transaction; super-server nodes handle the massive transaction loads.

31

b) Roaming agents the environment is populated with all types of agents. This agent technology includes crossplatform scripting engines, workflow, and Java-like mobile code environments that allow agents to live on any machine on the network. c) Rich data management This includes active multimedia compound documents that can move, store, view and edit in-place anywhere on the network. Most nodes on the network provides compound document technology for example, OLE or OpenDoc-for mobile document management. d) Intelligent self-managing entities With the introduction of new multi-threaded, high-volume, network-ready desktop operating systems, increased the workload on the server operating system. This type of distributed software knows how to manage and configure itself and protect itself against threats. e) Intelligent Middleware -The distributed environment must provide the semblance of a single system-image across potentially millions of hybrid client/server machines. The middleware creates this illusion by making all servers on the global network appear to behave like a single computer system. Users and programs should be able to dynamically join and leave the network, and then discover each other. 2-Tier Vs 3-Tier Instead of Fat clients and fat servers these terms can be used. It is all about how you split the client/server applications into functional units. These functional units can be assigned to either the client or to one or more servers. The most typical functional units are: o User Interface o Business Logic and o the Shared Data In 2-tier, the application logic is either buried inside the User Interface on the client or within the database on the server (or both) 2-tier system examples: File Servers and Database Servers with stored procedure. In 3-tier, the application logic (or) process lives in the middle-tier, it is separated from the data and the user interface. 3-tier systems are more scalable, robust and flexible. In addition, they can integrate data from multiple sources. Examples: TP Monitors, Distributed Objects and the Web. Different Meanings for 3-tier: First: tier 1 Application in PC tier 2 Departmental Servers tier 3 Enterprise Servers Then: tier 1 Partitions across client tier 2 local database tier 3 enterprise database Now: tier 1 Client

32

tier 2 Application Server tier 3 Database Server Client/Server Concepts From Wikipedia, the free encyclopedia Client-server is a computing architecture which separates a client from a server, and is almost always implemented over a computer network. Each client or server connected to a network can also be referred to as a node. The most basic type of client-server architectureemploys only two types of nodes: clients and servers. This type of architecture is sometimes referred to as two-tier. It allows devices to share files and resources. Each instance of the client software can send data requests to one or more connectedservers. In turn, the servers can accept these requests, process them, and return the requested information to the client. Although this concept can be applied for a variety of reasons to many different kinds of applications, the architecture remains fundamentally the same. These days, clients are most often web browsers, although that has not always been the case. Servers typically include web servers, database servers and mail servers. Online gaming is usually client-server too. In the specific case of MMORPG, the servers are typically operated by the company selling the game; for other games one of the players will act as the host by setting his game in server mode. The interaction between client and server is often described using sequence diagrams. Sequence diagrams are standardized in the Unified Modeling Language. Characteristics Characteristics of a client Request sender is known as client Initiates requests Waits for and receives replies. Usually connects to a small number of servers at one time Typically interacts directly with end-users using a graphical user interface

Characteristics of a server Receiver of request which is send by client is known as server Passive (slave) Waits for requests from clients Upon receipt of requests, processes them and then serves replies Usually accepts connections from a large number of clients Typically does not interact directly with end-users

Multi-tiered architecture Some designs are more sophisticated and consist of three different kinds of nodes: clients, application servers which process data for the clients, and database servers which store data for the application servers. This configuration is called a three-tier architecture, and is the most commonly used type of client-server architecture. Designs that contain more than two tiers are referred to as multi-tiered or n-tiered. The advantages of n-tiered architectures is that they are far more scalable, since they balance and distribute the processing load among multiple, often redundant, specialized server nodes. This in turn improves overall system performance and reliability, since more of the processing load can be accommodated simultaneously.[1]

33

The disadvantages of n-tiered architectures include: 1. More load on the network itself, due to a greater amount of network traffic. 2. More difficult to program and test than in two-tier architectures because more devices have to communicate in order to complete a clients request. Comparison to Peer-to-Peer Architecture Another type of network architecture is known as peer-to-peer, because each node or instance of the program can simultaneously act as both a client and a server, and because each has equivalent responsibilities and status. Peer-topeer architectures are often abbreviated using the acronym P2P. Both client-server and P2P architectures are in wide usage today. Comparison to Client-Queue-Client Architecture While classic Client-Server architecture requires one of communication endpoints to act as a server, which is much harder to implement, Client-Queue-Client allows all endpoints to be simple clients, while the server consists of some external software, which also acts as passive queue (one software instance passes its query to another instance to queue, e.g. database, and then this other instance pulls it from database, makes a response, passes it to database etc.). This architecture allows greatly simplified software implementation. Peer-to-Peer architecture was originally based on Client-Queue-Client concept. Advantages In most cases, client-server architecture enables the roles and responsibilities of a computing system to be distributed among several independent computers that are known to each other only through a network. This creates an additional advantage to this architecture: greater ease of maintenance. For example, it is possible to replace, repair, upgrade, or even relocate a server while its clients remain both unaware and unaffected by that change. This independence from change is also referred to asencapsulation. 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 those data are far easier to administer than would be possible under a P2P paradigm. Under a P2P architecture, data updates may need to be distributed and applied to each peer in the network, which is both time-consuming and error-prone, as there can be thousands or even millions of peers. Many mature client-server technologies are already available which were designed to ensure security, friendliness of the user interface, and ease of use. It functions with multiple different clients of different capabilities. Disadvantages Traffic congestion on the network has been an issue since the inception of the client-server paradigm. As the number of simultaneous client requests to a given server increases, the server can become severely overloaded. Contrast that to a P2P network, where its bandwidth actually increases as more nodes are added, since the P2P networks overall bandwidth can be roughly computed as the sum of the bandwidths of every node in that network. The client-server paradigm lacks the robustness of a good P2P network. Under client-server, should a critical server fail, clients requests cannot be fulfilled. 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. Examples Imagine you are visiting eCommerce web site. In this case, your computer and web browser would be considered the client, while the computers, databases, and applications that make up the online store would be considered the server. When your web browser requests specific information from the online store, the server finds all of the data in

34

the database needed to satisfy the browsers request, assembles that data into a web page, and transmits that page back to your web browser for you to view. Specific types of clients include web browsers, email clients, and online chat clients. Specific types of servers include web servers, ftp servers, application servers, database servers, mail servers, file servers, print servers, and terminal servers. Most web servicesare also types of servers. Notes

1. This form of scalability is called horizontal scalability. There is substantial and growing criticism that
horizontal scalability is limiting as applications become more complex and interdependent, particularly in the areas of network latency, reliability, and manageability. IBM, in particular, takes this view and promotes both vertical and horizontal scalability. Vertical scalability implements fewer servers able to support multiple application and database tiers, and multiple applications, concurrently. The IBM System z is the most notable example of a vertically scalable system. Fat Servers OR Fat Clients Client/Server applications can also be differentiated by how the distributed application is split between the client and the server. The fat server model places more function on the server. The fat client does the reverse. Groupware, transaction and the web servers are examples of fat servers; database and file servers are examples of fat clients. Distributed objects can be either.

Fat Client Fat clients are the more traditional form of client/server. The bulk of the application runs on the client side of the equation. In both the file server and database server models, the clients know how the data is organized and stored on the server side. Fat clients are used for decision support and personal software. They provide flexibility and opportunities for creating front-end tools that let end-users create their own applications. Fat Server: Fat Server applications are easier to manage and deploy on the network because most of the code runs on the servers. Fat servers try to minimize network interchanges by creating more abstract levels of service. Transaction and object servers, for example, encapsulate the database. The client in the fat server model provides the GUI and interacts with the server through remote procedure calls (or method invocations)

35

These are used for mission-critical applications, represent the new growth area fro PC-based client/server computing. DATABASE CONNECTIVITY AND ITS NEEDS: Open Database Connectivity (ODBC) ODBC specifies standard CLI ODBC is a superset of ANSI/ISO CLI ODBC uses standard SQL (SQL-92) ODBC defines minimum SQL for non-RDBMS data ODBC Drivers expose existing functionality ODBC is available on Windows, Macintosh, OS/2, UNIX, etc. ODBC is used by most commercial applications ODBC has over 370 drivers from over 100 companies ODBC has a speed same as native CLI ODBC is: A database API specification ODBC is not: A heterogeneous query engine A database management system A way to add database featuresODBC is available on Windows, Macintosh, OS/2, UNIX, etc.ODBC is used by most commercial applicationsODBC has over 370 drivers from over 100 companiesODBC has a speed same as native CLI ODBC Architecture:

The various components of the ODBC Architecture are described as follows: Application layer: Only one application resides in theapplication layer at a time. The application Calls ODBCfunctions. Application layer is linked to theDriver Manager. Application layer is written by manycompanies Driver Manager: One Driver Manager exists. The Driver Manager loads andunloads drivers. The Driver Manager implementsODBC functions. The Driver Manager passes mostODBC function calls to drivers The Driver Manager handles backward compatibility The Driver Manager is written byMicrosoft or Visigenic Driver:

36

There may be one or more drivers per application. The driver implements ODBCfunctions. The Driver is a thin layer over RDBMS. The Driver is a thick layer over non-RDBMS (includes SQL engine). The Driver is written by smallnumber of companies Data Source: There may be one or more datasources per driver. The Data Source contains actualdata.Typical examples of Data Source includeRDBMS, dBase file, spreadsheet, etc TWO-TIER ARCHITECTURE: Two-tier architecture is where a client talks directly to a server, with no interveningserver. It is typically used in small environments (less than 50 users)

In two-tier client/server architectures, the client interface is usually located in the user'sdesktop environment and the database management services are in a more powerful server thatservices many clients. The user system interface environment and the database management server environment split the processing management duties. The database management server containsstored procedures and triggers. Two-tier architectures are typical of environments with few clients homogeneous environments closed environments (e.g. DBMS) The characteristics of two-tier architecture include: 1. 2. 3. 4. 5. Application components are distributed between the server and client software. In addition to part of the application software, the server also stores the data and all data accesses are through the server. The presentation to the user is handled strictly by the client software. The PC clients assume the bulk of the responsibility for the application logic. The server assumes the bulk of the responsibility for data integrity checks, querycapabilities, data extraction and most of the data intensive tasks, including sending the appropriate data to the appropriate clients.

The whole point of client-server architecture is to distribute components of an application between a client and a server so that, for example, a database can reside on a server machine (for example a UNIX box or mainframe), a user interface can reside on a client machine (a desktopPC), and the business logic can reside in either or both components. Client/server applications started with a simple, 2-tiered model consisting of a client and an application server. Fat Client/Server Deployment:

37

t The most common implementation is a 'fat' client - 'thin' server architecture, placingapplication logic in the client. The database simply reports the results of queries implemented viadynamic SQL using a call level interface (CLI) such as Microsoft's Open Database Connectivity(ODBC) Thin Client/Server Deployment:

An alternate approach is to use thin client fat server waylays that invokes proceduresstored at the database server. The term thin client generally refers to user devices whosefunctionality is minimized, either to reduce the cost of ownership per desktop or to provide more user flexibility and mobility. In either case, presentation is handled exclusively by the client, processing is split between client and server, and data is stored on and accessed through the server. Remote database transport protocols such as SQL-Net are used to carry the transaction. The network 'footprint' is very large per query so that the effective bandwidth of the network, and thus the corresponding number of users who can effectively use the network, is reduced. Furthermore, network transaction size and query transaction speed is slowed by this heavy interaction. These architectures are not intended for mission critical applications.Development tools that generate 2-tiered fat client implementations include PowerBuilder, Delphi, Visual Basic, and Uniface. The fat server approach, using stored procedures is more effective in gaining performance, because the network footprint, although still heavy, is lighter than that of a fat client. Example: The UNIX print spooler is an example of two-tier client-server architecture. The client (theUNIXlpcommand) reads a file to be printed and passes the file's contents to the server. The server performs a service by printing the file. Advantages:

38

Accessibility: The server can be accessed remotely and across multiple platforms. Speed: Good application development speed. Durability: Most tools for the 2-tier architecture are very robust. Development: Ease of application development. Economy: Lower total costs than mainframe legacy systems. User friendly: It uses the familiar point and click interface. Stativity: Two-tier architectures work well in relatively homogeneous environments with fairly static business rules. Disadvantages: Non-Adaptability: 2-tier architecture is not suited for dispersed, heterogeneousenvironments with rapidly changing business logic. Software Incompatibility: Because the bulk of the application logic is on the client, thereis a problem of client software version control and new version redistribution. Complexity: Security can be complicate because a user may require separate passwords for each SQL server accessed. THREE-TIER ARCHITECTURE: Three-tier architecture introduces a server or an "agent" between the client and the server. The role of the agent is many-fold. It can provide translation services (as in adapting a legacy application on a mainframe to a client/server environment), metering services (as in acting as a transaction monitor to limit the number of simultaneous requests to a given server), or intelligent agent services (as in mapping a request to a number of different servers, collating the results, and returning a single response to the client. The most popular type of n-tier clientserver architecture to evolve from two-tier architecture was three-tier architecture which separated application components into three logical tiers. The components of three-tiered architecture are divided into three layers: A presentation layer, Functionality layer, and Data layer Application components are well-defined and separate processes, each running on a different platform: 1. The user interface, which runs on the user's computer (the client). 2. The functional modules that actually process data. This middle tier runs on a server and is often called the application server 3. A database management system (DBMS)that stores the data required by the middle tier. This tier runs on a second server called the database server In this type of system, the user interface tier communicates only with the business logic tier,never directly with the database access tier. The business logic tier communicates both with theuser interface tier and the database access tier.The 3-tier architecture attempts to overcome some of the limitations of 2-tier schemes byseparating presentation, processing, and data into separate distinct entities. The middle-tier serversare typically coded in a highly portable, nonproprietary language such as C. Middle-tier functionality servers may be multithreaded and can be accessed by multiple clients, even thosefrom separate applications

3-Tiered Application Architecture The client interacts with the middle tier via a standard protocol such as DLL, API, or RPC.The middle-tier interacts with the server via standard database protocols.The middle-tier contains most of the application logic, translating client calls into databasequeries and other actions, and translating data from the database into client data in return. If

39

themiddle tier is located on the same host as the database, it can be tightly bound to the database viaan embedded 3gl interface.This yields a very highly controlled and high performance interaction, thus avoiding thecostly processing and network overhead of SQL-Net, ODBC, or other CLIs. Furthermore, themiddle tier can be distributed to a third host to gain processing power capability. Advantages of 3-Tier Architecture: RPC calls provide greater overall system flexibility than SQL calls in 2-tier architectures.3-tier presentation client is not required to understand SQL. This allows firms to accesslegacy data, and simplifies the introduction of new data base technologies.It provides for more flexible resource allocation.Modularly designed middle-tier code modules can be reused by several applications.3-tier systems such as Open Software Foundation's Distributed Computing Environment(OSF/DCE) offer additional features to support distributed applications development.The added modularity makes it easier to modify or replace one tier without affecting theother tiers. Separating the application functions from the database functions makes it easier toimplement load balancing. N-TIER ARCHITECTURE: The 3-tier architecture can be extended to N-tiers when the middle tier providesconnections to various types of services, integrating and coupling them to the client, and to eachother. Partitioning the application logic among various hosts can also create an N-tiered system.Encapsulation of distributed functionality in such a manner provides significant advantages such asreusability, and thus reliability.As applications become Web-oriented, Web server front ends can be used to offload thenetworking required to service user requests, providing more scalability and introducing points of functional optimization.In this architecture, the client sends HTTP requests for content and presents the responses provided by the application system.On receiving requests, the Web server either returns the content directly or passes it on to aspecific application server.The application server might then run CGI scripts for dynamic content, parse databaserequests, or assemble formatted responses to client queries, accessing dates or files as needed froma backend database server or a file server.

Web-Oriented N-Tiered Architecture By segregating each function, system bottlenecks can be more easily identified and cleared by scaling the particular layer that is causing the bottleneck. For example, if the Web server layer is the bottleneck, multiple Web servers can be deployed, with an appropriate server load-balancing solution to ensure effective load balancing across the servers as shown below.

Four-Tiered Architecture with Server Load Balancing Advantages:

40

The N-tiered approach has several benefits: Different aspects of the application can be developed and rolled out independently. Servers can be optimized separately for database and application server functions. Servers can be sized appropriately for the requirements of each tier of the architecture. More overall server horsepower can be deployed. COMPARISION BETWEEN THE TIER ARCHITECTURES: Stable, low-volume growth Low reporting and batch processing needs Minor integration of other technology (e.g., Internet) LAN-based application deployment Variable system deployment scenarios at different levels of business using LANs &WANs Regular changes in business logic and rules Extensive use of Internet or telephony integration WAN-based application deployment Variable-demand batch processing Variable-demand report processing Web service process delivery Casual use by many networked clients N-TIER ARCHITECTURE Definition: In software engineering, multi-tier architecture (often referred to as n-tier architecture) is a client-server architecture in which an application is executed by more than one distinct software agent. For example, an application that uses middleware to service data requests between a user and a database employs multi-tier architecture. The most wide spread use of "multi-tier architecture" refers to three-tier architecture. Two-tier Two-tier Two-tier Two-tier Three-tier Three-tier Three-tier Three-tier N-tier N-tier N-tier N-tier

RIGHTSIZING Downsizing

The downward migrations of business applications are often from mainframes to PCs due to low costing of workstation. And also todays workstations are as powerful as last decades mainframes. The result of that is Clients having power at the cost of less money, provides better performance and then system offers flexibility to make other purchase or to increase overall benefits. Upsizing

Moves the Client/Server applications to the most appropriate server platform, in that case the servers from different vendors can co-exist and the network is known as the system. Getting the data from the system no longer refers to a single mainframe. As a matter of fact, we probably dont know where the server physically resides Smartsizing

The bottom-up trend of networking all the stand alone PCs and workstations at the department or work group level. Early LANs were implemented to share hardware(printers, scanners, etc.). But now LANs are being implemented to share data and applications in addition to hardware. Mainframes are being replaced by lesser expensive PCs on networks. This is called computer downsizing. Companies implementing business process reengineering are downsizing organizationally. This is called business downsizing. All this would result in hundreds of smaller systems, all communicating to each other and serving the need of local teams as well as individuals working in an organization. This is called cultural downsizing. The net result is distributed computer systems that support decentralized decision-making.

41

42

Das könnte Ihnen auch gefallen