Vous êtes sur la page 1sur 17

Client-Server Model

Clients and Servers


Processes are divided into Servers: implementing a specific service Clients: requesting a service from a server by sending it a request and subsequent waiting for the servers reply Distributed across different machines Follow a request-reply

Whats a Server?
Definition: A process that implements a specific service on behalf of a collection of clients. Typically, servers are organised to do one of two things: 1. Wait 2. Service wait service wait service wait
3

Servers: Iterative and Concurrent


Iterative: server handles request, then returns results to the client; any new client requests must wait for previous request to complete (also useful to think of this type of server as sequential). Concurrent: server does not handle the request itself; a separate thread or sub-process handles the request and returns any results to the client; the server is then free to immediately service the next client (i.e., theres no waiting, as service requests are processed in parallel).
4

Server States
Stateless servers no information is maintained on the current connections to the server. The web is the classic example of a stateless service. As can be imagined, this type of server is easy to implement. Stateful servers information is maintained on the current connections to the server. Advanced file servers, where copies of a file can be updated locally then applied to the main server (as the server knows the state of things). These are more difficult to implement. Cookies?
5

Application Layering
Traditional three-layered view User-interface layer: programs that allow end users to interact with the application; differ in their sophistication Processing layer: contains the functions of an application Data layer: contains the data that a client wants to manipulate through the application components (persistency, consistency, data independence)
6

Processing Level Multi-layered

1-28

The general organization of an Internet search engine into three different layers often referred to as tiers.

Multitiered Architectures (1)

1-29

Alternative client-server organizations (a) (e).


8

Multitiered Architectures (2)

Multitiered Architectures (3)

1-30

An example of a server acting as a client this is a very common vertical distribution model for distributed systems.

10

Horizontal vs Vertical Splitting


Vertical distribution: placing logically different components on different machines Horizontal distribution: a client or server may be physically split up into logically equivalent parts; each operating on its own share of the complete data

11

Example Modern Architecture

1-31

An example of horizontal distribution of a Web service (often also referred to as clustering).

12

Alternative Architectures
Cooperating servers
Traditional Multi-tier systems Replicated servers

Cooperating clients
Teleconferencing

Web applets Peer-to-peer networks

13

Cooperating Servers (1)

Multi-tiered system
14

Cooperating Servers (2)

Proxy server
15

Web Applets

16

Peer-to-peer Networks

17

Vous aimerez peut-être aussi