Page 178 -
P. 178

6.3   Architectural patterns  161


                        Name           Client–server

                        Description    In a client–server architecture, the functionality of the system is organized into services,
                                       with each service delivered from a separate server. Clients are users of these services and
                                       access servers to make use of them.
                        Example        Figure 6.11 is an example of a film and video/DVD library organized as a client–server
                                       system.

                        When used      Used when data in a shared database has to be accessed from a range of locations.
                                       Because servers can be replicated, may also be used when the load on a system is
                                       variable.

                        Advantages     The principal advantage of this model is that servers can be distributed across a network.
                                       General functionality (e.g., a printing service) can be available to all clients and does not
                                       need to be implemented by all services.
                        Disadvantages  Each service is a single point of failure so susceptible to denial of service attacks or
                                       server failure. Performance may be unpredictable because it depends on the network
                                       as well as the system. May be management problems if servers are owned by different
                                       organizations.



                                         A system that follows the client–server pattern is organized as a set of services
                     Figure 6.10 The
                     client–server pattern  and associated servers, and clients that access and use the services. The major com-
                                       ponents of this model are:

                                       1.  A set of servers that offer services to other components. Examples of servers
                                          include print servers that offer printing services, file servers that offer file man-
                                          agement services, and a compile server, which offers programming language
                                          compilation services.
                                       2.  A set of clients that call on the services offered by servers. There will normally
                                          be several instances of a client program executing concurrently on different
                                          computers.

                                       3.  A network that allows the clients to access these services. Most client–server
                                          systems  are  implemented  as  distributed  systems,  connected  using  Internet
                                          protocols.

                                         Client–server architectures are usually thought of as distributed systems architec-
                                       tures but the logical model of independent services running on separate servers can
                                       be implemented on a single computer. Again, an important benefit is separation and
                                       independence. Services and servers can be changed without affecting other parts of
                                       the system.
                                         Clients may have to know the names of the available servers and the services that
                                       they provide. However, servers do not need to know the identity of clients or how
                                       many clients are accessing their services. Clients access the services provided by a
                                       server through remote procedure calls using a request-reply protocol such as the http
   173   174   175   176   177   178   179   180   181   182   183