1 / 35

Client Server Paradigm

Client Server Paradigm. Objectives: Taxonomy of distributed systems service models point of view Client-server architecture Thin versus thick clients Two and three tier architectures Tradeoffs between these different architectures Software Architectures for Clients and Servers.

kristinae
Download Presentation

Client Server Paradigm

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Client Server Paradigm Objectives: • Taxonomy of distributed systems • service models point of view • Client-server architecture • Thin versus thick clients • Two and three tier architectures • Tradeoffs between these different architectures • Software Architectures for Clients and Servers

  2. Distributed Systems: Service-models Taxonomy • Centralized model • Client-server model • Cluster-based model • Grid-based model • Peer-to-peer model

  3. Distributed Systems: Service-models Taxonomy • Centralized model • This the classic mainframe time-sharing system • The computer may contain more than one CPU • Terminals have serial connections • Drawbacks • Single-point of failure • Not scalable • Resource contention • Are there any advantages?

  4. Distributed Systems: Service-models Taxonomy • Client-server model • A networked model consisting of three components • Server • Client • Service • The labels client and server are within the context of a particular service • Advantages? • Disadvantages? • The labels client and server are within the context of a particular service

  5. Distributed Systems: Service-models Taxonomy • Cluster-based model • Tightly-coupled • Closely linked via LAN networking • Grid-based model • Focuses on the ability to support computation across administrative domains • Peer-to-peer model • Example: Gnutella, Kazaa • Peers are intermittently connected and change IP addresses

  6. Distributed Systems: comparison • Where does a client server computing fit?

  7. Client Server Architecture • It is way of designing an application in which clients contact well-known servers to access resources • What fraction of the task do clients process before giving the work to the server? • Thin clients • Clients are information appliances • Servers are resource-rich • Must have a resource-rich connectivity • Thick clients • Clients perform the bulk of data processing operations • Servers perform rudimentary tasks • Trade-offs between thin and thick clients?

  8. Two-tier Client Server Architecture • Traditional client-server architecture • A good solution for small-scale group sizes • This architecture has limitations • Does not scale • Restricts flexibility • Moving or repartitioning program functionalities

  9. Multi-tier Client Server Architectures • Example: three-tier architecture • The three-tier design has many advantages over traditional two-tier • Added modularity • Function isolation • Scalability

  10. Client-server system architecture vs. Client-server distributed computing • In the client-server system architecture, the terms clients and servers refer to computers • In the client-server distributed computing paradigm, the terms refer to processes

  11. Client-server, an overloaded term

  12. Client-server system The interprocess communications and event synchronization • Typically, the interaction of the client and server processes follows a request-response pattern.

  13. Software Architectures for Clients and Servers • The Software architecture of client-server application consists of • Presentation layer • Application layer • Service layer • Any client-server software must have the three-layer functionalities • Is this a good approach? Why?

  14. Software Architectures for Clients and Servers: Example • We will look at a Daytime client-server software • Daytime service [RFC867]: • Client: Hello, <client address> here. May I have a timestamp please. • Server: Here it is: (time stamp follows)

  15. Software Architectures for Clients and Servers: Separating the layers • Allows each module to be developed by appropriate people • People have different skills • Allows modifications to be made in isolation

  16. Client-Server Paradigm Issues • A service session • Same service might be requested by multiple clients • Client sessions need to be kept separated and isolated • The service protocol • How the service is to be located • The sequence of the IPC • Data syntax and semantics • IPC and event synchronization

  17. Testing a Network Service • Since network software is notoriously difficult to test • Use the three-layered software architecture and modularize each layer on both the client and the server • Use an incremental or stepwise approach in developing each module • Develop the client first • Test the client independent of the server • Test the client-server suite on one machine before running the programs on separate machine

  18. Client-Server Paradigm: Server Types • Connection-oriented server • Connectionless-oriented servers • Iterative servers • Concurrent servers • Stateful servers • Stateless serves

  19. Client-Server Paradigm: Server Types • Connection-oriented server • Connectionless-oriented servers • Iterative servers • Concurrent servers • Stateful servers • Stateless serves We will look at the tradeoffs of these different server types

  20. Connection-oriented communication • A separate connection is maintained for each session • Once the connection is established, data can be sent until the session is over • The connection needs to be explicitly torn down • Imagine that we have n processes • What happens if a connection is established between a sender and every other process? • What happens if all the n processes is a sender? Connection-oriented servers rely on connection-oriented communication

  21. Connection-oriented: Daytime Server Example …theServer = new ServerSocket(thePort); p = new PrintWriter(System.out); try { p.println("Echo Server now in business on port " + thePort ); p.flush(); theConnection = theServer.accept(); // read a line from the client theInputStream = new BufferedReader (new InputStreamReader (theConnection.getInputStream())); p = new PrintWriter(theConnection.getOutputStream()); while (!done){ theLine = theInputStream.readLine(); if (theLine == null) done = true; else{ p.println(theLine); p.flush(); } } theConnection.close(); Connection acceptance Protocol processing

  22. Connectionless-oriented communications • Involves no connection • Packets are explicitly addressed by the sender • The connection needs to be explicitly torn down • Connectionless communications are simpler to provide • Packets can be delivered out of order Connectionless-oriented servers rely on connectionless-oriented communication

  23. Iterative Servers • An iterative server in unable to overlap client sessions • Is a connection-oriented server an iterative server? If yes, why? • Suppose that n clients have requested connection at a given time, and each session is expected to last t time units. What will happen to request n+1? • What is the solution???

  24. Concurrent Servers • A concurrent server in capable of conducting multiple client sessions at once • A concurrent server can be provided by using • Threads or • Asynchronous IPC operations

  25. Stateful servers • A stateful server maintain stateful information on each active client • Stateful information can reduce the data exchanged, and thereby the response time

  26. Stateful vs. Stateless server • Stateless server is straightforward to code, but the state information maintained by the server can reduce the data exchanged • Are there any problems with stateful servers?

  27. Stateful vs. stateless server In actual implementation, a server may be • Stateless • Stateful • A hybrid, wherein the state data is distributed on both the server-side and the client-side Which type of server is chosen is a design issue

  28. Global state information • Information maintained by a server for all the clients throughout the lifetime of a service • The global state information needs to be synchronized for mutual exclusion

  29. Session state information • Information maintained specific to a client session • Two schemes to maintain session information • Session information maintained by the client • The server processes each request in the same manner • The complexity of the server’s application logic is reduced • Such a server is called stateless • Session information maintained by the server • Server keeps track of the session progress of the client • Server is more complex to design and implement • Failure provisions

  30. Summary • You have been introduced to the client-server paradigm in distributed computing. Topics covered include • The difference between the client-server system architecture and the client-server distributed computing paradigm • Definition of the paradigm and why it is widely adopted in network services and network applications • The issues of service sessions, protocols, service location, interprocess communications, data representation, and event synchronization in the context of the client-server paradigm

  31. Summary: Con. • The three-tier software architecture of network applications: Presentation logic, application logic, and service logic • Connectionless server versus connection-oriented server • Iterative server versus concurrent server and the effect on a client session • Stateful server versus stateless server • In the case of a stateful server: global state information versus session state information

  32. Summary: Con. • You are required to read the following: • The paper entitled “A taxonomy of distributed computing” • Chapter 5 of the Distributed Computing book • Chapter 2 of the Distributed Computing book

More Related