Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
CLIENT SERVER COMPUTING www.notesvillage.com • We have 2 types of n/w architectures – client server and peer to peer. • In P2P, each system has equal capabilities and responsibilities . • In CS, it is different. • CS architecture is also called 2 tier architecture. www.notesvillage.com Client • It is an application that runs on a personal computer or work station and relies on a server to perform some operations. • Eg: web browser, email clients • It is a part of the client server model that communicates with the server through inter process communication techniques. www.notesvillage.com • Clients can be classified as either fat, thin or hybrid. • A fat client, also known as a rich client or thick client, is a client that performs the bulk of any data processing operations itself, and does not necessarily rely on the server. www.notesvillage.com • A thin client is a minimal sort of client. Thin clients use the resources of the host computer. • A thin client's job is generally just to graphically display pictures provided by an application server, which performs the bulk of any required data processing. • A hybrid client is a mixture of the above two client models. www.notesvillage.com Server • A server is a computer program that provides services to other computer programs (and their users) in the same or other computers. • The computer that a server program runs is also frequently referred to as a server. • Depending on the computing service that it offers it could be a database server, file server, mail server, print server, web server, gaming server, or some other kind of server. www.notesvillage.com • In the client/server programming model, a server is a program that awaits and fulfills requests from client programs in the same or other computers. • A given application in a computer may function as a client with requests for services from other programs and also as a server of requests from other programs. www.notesvillage.com • Client server is the distribution of an application program into two logically separate components, each performing very separate duties. • Load balancing between client and server. www.notesvillage.com Methods for creating Client Server Applications • Different methods in which CS applications are developed are: 1.) 3GL like C,C++,COBOL,PASCAL etc 2.)4GL like FoxPro,Panther,PowerBuilder,Matlab,PL/SQL etc. 3.) CASE: Computer Aided S/W Engineering. It produce client server applications with graphical interfaces as output. 4.)5GL visual builders: It helps developers to code very sophisticated applications without writing source code of any kind. www.notesvillage.com Heterogeneous Computing • Diverse computing environment containing PCs, minicomputers, mainframe computers etc. • Each application vendor must strive to support key platform for its target s/w consumer. • Organizations buy software based on 3 criteria. www.notesvillage.com 1.) Is it compatible with our existing s/w and h/w? 2.) Will it integrate with our current platform? 3.) Will it integrate with platforms we intend to use in the future? www.notesvillage.com • In heterogeneous computing, h/w platforms must be able to support multiple operating systems, networks and protocols. • Operating systems should communicate with other operating systems. • Operating systems must be independent like Windows NT,UNIX. www.notesvillage.com hardware Cross Platform Computing • An application which runs on multiple platforms. • A cross-platform application may run on Microsoft Windows on the x86 architecture, Linux on the x86 architecture and Mac OS X on either the PowerPC or x86 based Apple Macintosh systems. • It is the responsibility of the application developer to take care of these things. www.notesvillage.com • The key things to be done by application programmer as follows: 1.) The application must run on multiple platforms. 2.) It must have the same look and feel on other platforms. 3.) It must integrate with the native operating environment. 4.) It must be maintained simply and consistently. www.notesvillage.com • Some integrated development environments or frameworks are available for client server applications running in heterogeneous environments. • E.g: Microsoft’s Windows Open System Architecture(WOSA), the UNIX COSE and Novell’s AppWare Foundation. www.notesvillage.com Distributed Computing • A distributed system consists of multiple computers that communicate through a computer network. • The computers interact with each other in order to achieve a common goal. • In parallel computing, all processors may have access to a shared memory to exchange information between processors. • In distributed computing, each processor has its own private memory (distributed memory). Information is exchanged by passing messages between the processors. www.notesvillage.com • Distributed Computing is a form of client server computing. • Increase of overall application throughput and the ability to multitask are tremendous benefits to the user. • Corporates benefits from the integration of discrete network components and their functioning as a whole to increase efficiency and reduce costs. www.notesvillage.com • Distributed machines process work by exactly the same means as client server model. • Many distributed nodes may be working on behalf of one requesting client. • It is the responsibility of the client to manage information requests and the receipt of results. • Managing the load at a central server is very effective in distributed environment. • Work can be dispatched to nodes such as those geographically nearest the requesting client. www.notesvillage.com Costs of Client Server Computing • Early implementers believe that CSC is a cheaper alternative to mainframe or minicomputers. • In some cases CSC is more expensive than traditional systems. www.notesvillage.com CSC costs by functional area COST COMPONENT COST(%) APPLICATION DEVELOPMENT 28 SYSTEM SUPPORT+ MAINTENANCE 40 INFRASTRUCTURE 25 TRAINING 7 www.notesvillage.com CSC VS Minicomputer Cost Break down COST COMPONENT CSC MINICOMPUTER APPLICATION DEVELOPMENT 28 40 SYSTEM SUPPORT+ MAINTENANCE 40 30 INFRASTRUCTURE 25 27 TRAINING 7 3 www.notesvillage.com Benefits of Client Server Computing • Client is relieved of intensive computing tasks and can perform other duties. • So, client can respond better to local, end user requests. • From the clients perspective, applications are executed more quickly. • Users benefit because they are capable of performing more work in the same amount of time. www.notesvillage.com • Expensive computers with more processing power can be shared among many clients, which maximizes use of the most costly systems and fully utilizes their available resources. • Scalability of distributed networks is a large potential performance advantage for client server. www.notesvillage.com • Another advantage is use of client server for centralized data management. • Server can act as a focal point for data accessibility. • When essential connectivity and services are being provided, we can support a number of machines. www.notesvillage.com • The Application is unaware of underlying protocol support, has become the focal point for data accessibility. • Here, the server module is responsible for data access and may provide a centralized management to front end stations. • Server application provides data management services. • By providing a layer between data requests and data retrieval, the data management layer provides consistency to server applications and thus to client systems. www.notesvillage.com • Specifications such as Borland/Novell’s Integrated Database API (IDAPI) and Microsoft's Open Database Connectivity (ODBC) provide this interface. • Application programmers merely interface with the services provided by IDAPI or ODBC to fashion a single interface to multiple SQL data sources. www.notesvillage.com • Another advantage is effective use of server resources. • Disks, printers, faxes and services etc. can be shared by network clients. • Client server promises to improve the overall performance of application programs and minimize network usage. www.notesvillage.com • An obvious benefit of client server computing is Reduced Total execution time. • Advantage of reduced execution time is that client application can may take advantage of the additional CPU cycles that becomes available. • If the client OS is multitasking, the client application may run concurrently while waiting for the server computer to complete specified amount of work. • The client machine at this point is able to process more work in a shorter amount of time due to the concurrency. www.notesvillage.com • Another is reduced Client Memory Usage • Memory usage is decreased when implementing client server because application code as well as third party modules may be migrated to other platforms. www.notesvillage.com • Another advantage is reduced network traffic. • In Client Server model, the actual data manipulation resides on the server computer and usually not transferred to the client station during processing. • The client computer only receives data when the unit of work is completed. • As a result fewer network transmissions are required to compute tasks. www.notesvillage.com Client server Databases • Client machines: – Run own copy of an operating system. – Run one or more applications using the client machine's CPU, memory. – Application communicates with DBMS server running on server machine through a Database Driver – Database driver (middleware) makes a connection to the DBMS server over a network. www.notesvillage.com • Server Machines: – Run own copy of an operating system. – Run a Database Management System that manages a database. – Provides a Listening daemon that accepts connections from client machines and submits transactions to DBMS on behalf of the client machines. – Examples: Sun Sparc server running UNIX operating system, PC with Windows NT operating system. RDBMS such as Oracle Server, Sybase, Informix, DB2 www.notesvillage.com • Middleware: – Small portion of software that sits between client and server. – Establishes a connection from the client to the server and passes commands between them. – E.g ODBC www.notesvillage.com Fundamentals of Client Server Design • Client Server systems are the coordination of involvement between two logical systems (client & server) and their application logic components. • Many logical components execute most efficiently on the client; many will execute efficiently on the server. • Managing these logic components is the essence of client server application. www.notesvillage.com • Designing applications to become client server requires proper architecture. • Because portions on application execute on more than one system, client server software must be modularized for distribution among different machines. www.notesvillage.com • Separating application functionality into components makes writing client server applications much easier because components provide well defined locations where applications may become distributed. • This logical separation better prepares applications for distribution across a network. www.notesvillage.com Division of labor between client and Server • The following lists show components and their most efficient execution location. Client Presentation/display User interaction Application logic Request formulation www.notesvillage.com Server Queries against shared resources Management: Application and data Transaction processing Centralized application logic Communications Computations www.notesvillage.com Managing the interaction of client and server • There are 3 layers to be defined for application components to interact: 1. Application interaction protocol 2. Communication Technique 3. Network protocol www.notesvillage.com Application Interaction protocols • They are uniquely defined for each program. • Used to logically describe the data being passed between client and server components. • It is independent of the underlying network protocol used to actually transfer the data. www.notesvillage.com • Application Interaction protocols are of 2 types: -predefined - flexible www.notesvillage.com • A predefined protocol could be established between components where the order and modification of data passed between would not change. • In flexible protocol there is no predetermined format to the data being transmitted. • A predefined protocol offers an advantage in speed and simplicity. • Flexible protocol is more adaptable to traditional client programming and will require less demands of the client side programmer. www.notesvillage.com • Efficiency of client server protocol depends on how it prepares for transmission, acceptance and delivery of data between systems. • In flexible protocols, each parameter must be packed and described individually. • It will be a time consuming process depending on the data being passed between systems. • In predefined protocol there is no need of packaging of data. www.notesvillage.com • When properly architected the inter application level protocol should remain independent of the underlying communication protocols. • For programmers not familiar with client server design flexible protocol is easy. www.notesvillage.com Communication Techniques • There are generally 4 mechanisms for managing client to server interaction. 1. Remote Procedure calls 2. Native communication protocols 3. Messaging 4. Object orientation www.notesvillage.com • The quickest means of developing client server application code is with RPC. • Hand coding RPCs is a difficult process. • Products such as NobleNet EasyRPC provide client programmers an easy method for RPC. • A major drawback to RPCs is that traditionally they have been very synchronous in nature. • When a client makes RPC requests of the server procedure it is blocked until the server completes the function and returns. • Advanced RPC products do not have this limitation. www.notesvillage.com RPC • It is a type of protocol that allows a program on one computer to execute a program on a server computer. • Using RPC, a system developer need not develop specific procedures for the server. • The client program sends a message to the server with appropriate arguments and the server returns a message containing the results of the program executed. www.notesvillage.com • Another method for client server interaction is the message oriented products. • These products communicates between client and server in the form of messages. • The messages are processed by some queuing mechanism at the receiving node. • A messaging queue is obtained and once established messages can flow freely over this message queue. www.notesvillage.com • Another technology for distribution of applications is Object orientation. • Common Object Request Broker Architecture(CORBA) by Object Management Group(OMG) is specifically designed to deal with issues of distributing object technology and interfaces. • It helps objects to communicate with one another regardless of what PL they are written or what OS they are running. www.notesvillage.com • Also we have Distributed System Object Model(DSOM) from IBM and Component Object Model (COM) from Microsoft. • DSOM and COM uses CORBA architecture. • Sun Microsystems RMI is another one. www.notesvillage.com • We have many choices for communication protocols. • UNIX-TCP/IP • UnixWare or NetWare-IPX/SPX • Windows NT or OS/2- NetBIOS or Named Pipe • It is the responsibility of the application developer to assess the network protocol requirements and choose an appropriate communication protocol. www.notesvillage.com Techniques for implementing Client Server applications 1. Preparing applications for Client Server 2.Optimizing applications for Client Server www.notesvillage.com Preparing applications for Client Server • Architectural changes needed for client server development are: 1. Identify and group logically similar procedures. 2.Convert applications into Request/Response components. 3.Make server components reentrant. 4.Initiate data access on a per-client basis www.notesvillage.com Identify and group logically similar procedures. • The first major step in the migration from stand alone programming to client server is to identify procedures that are candidates for migration to the server. • Grouping similar procedures as whole components and migrating the entire set to the server will increase efficiency. • It minimizes client to server transitions. • Grouping procedures helps identify the dependencies of the procedural components. www.notesvillage.com Convert applications into Request/Response components. • The requesting and responding components of client server computing represent the most important architectural change between traditional application programs and client server applications. • When using a remote procedure call approach, many functions or procedures communicate remotely with the server. • The interface between requesting and responding agents varies widely and is strictly a developer design issue. www.notesvillage.com Make server components reentrant. • In environments where threads are supported, it is very important for the server components to be reentrant. • Being reentrant simply means that an application procedure can be called more than once and executed concurrently without causing corruption. • Variables defined locally are valid because they exist on a stack allocated uniquely for each call to the procedure. • Global variables modification will change the value contained by other threads making the same procedure call. www.notesvillage.com Initiate data access on a per-client basis • Each access to global data on behalf of the responding component will need to be made on a per request component basis. • In order for server functions to be reentrant , data must either be contained locally or be given serialized access to global data. • If global data is used serialization must be used to coordinate access so as not to corrupt the resource. www.notesvillage.com Optimizing application for client server 1. Minimizing the Data Passed between client and server. 2. Maintaining data at the server. 3. Processing Predefined Application protocols 4. Server Processing with queues. www.notesvillage.com Minimizing the Data Passed between client and server. • It can be achieved in two different ways. 1. Reducing the number of parameters or amount of data. It is done by sending only what is needed to the server. 2. The server could maintain similar data passed by the client on each function call. www.notesvillage.com • All parameters in a flexible protocol need to be packed and copied into a buffer at the client and unpacked and copied into parameters at the server. • This is an expensive process and is made worse when handling unnecessary data. www.notesvillage.com Maintaining data at the server. • For client server connections that involve many interactions between client and server, certain core information may be transmitted on each call. • This state information could easily be removed from the wire if the server remembered the data between calls from the client. • By maintaining the data at the server, the efficiency of the client server application can be increased. www.notesvillage.com Processing Predefined Application protocols • Better use predefined application protocols than flexible ones. • Since predefined ones are not flexible, a minimal amount of time is spent in transmission. • If properly architected, predefined protocols are efficiently processed. www.notesvillage.com Server Processing with queues. • Efficient server processing of client requests is greatly enhanced through efficient use of queues. • Using message queues for communication between client and server is used. www.notesvillage.com • Any client server interaction, has the following characteristics: 1.The interface between Request/Response components. 2.The formulation of requests from the client side. 3.The transmission of requests between components. 4.Acceptence and unpacking of requests from the client. 5.The execution of requests at the server. 6.Transmission of response to the client. www.notesvillage.com Multiprogramming and Multitasking • It is the capability of an operating system to support multiple applications running concurrently. • The term more widely used to describe multiprogramming is multitasking. • Multitasking gives the users a feeling that multiple applications are running at once. • I/O burst and CPU burst. • Single-Tasking and Multitasking Systems. www.notesvillage.com • E.g: Single tasking OS- DOS Multitasking OS- Novell Netware, UnixWare, Microsoft Windows NT, IBM OS/2 www.notesvillage.com Process • Program in execution • Has 2 main characteristics-code execution and resource ownership. • Each application loaded into memory is represented as a process that is the controlling mechanism in a multitasking system. • A process can create other processes. • Parent process and Child process. www.notesvillage.com • A database server might construct one process to communicate with clients, one to read databases, one to write databases etc. • Each separate process must communicate via some form of inter process communication(IPC) which is specific to the OS. www.notesvillage.com • Application programmers must distribute the server application’s functionality among different programs. • These programs will be executed as loadable processes and will interact with each other to form the server application. www.notesvillage.com www.notesvillage.com www.notesvillage.com www.notesvillage.com www.notesvillage.com www.notesvillage.com www.notesvillage.com