Architectural models The architecture of a system is its structure in terms of separately specified components. The overall goal is to ensure that the structure will meet present and likely future demands on it. Major concerns are to make the system reliable, manageable, adaptable and cost-effective. The architectural design of a building has similar aspects - it determines not only its appearance but also its general structure and architectural style (gothic, neo-classical, modern) provides a consistent frame of reference for the design. In this section, we shall describe the main architectural models employed in distributed systems - the architectural styles of distributed systems. We build our architectural models around the concepts of process and object introduced in Chapter 1. An architectural model of a distributed system first simplifies and abstracts the functions of the individual components of a distributed system and then it considers: - the placement of the components across a network of computers - seeking to define useful patterns for the distribution of data and workload; - the interrelationships between the components - that is, their functional roles and the patterns of communication between them. An initial simplification is achieved by classifying processes as server processes, client processes and peer processes - the latter being processes that cooperate and communicate in a symmetrical manner to perform a task. This classification of processes identifies the responsibilities of each and hence helps us to assess their workloads and to determine the impact of failures in each of them. The results of this analysis can then be used to specify the placement of the processes in a manner that meets performance and reliability goals for the resulting system. Some more dynamic systems can be built as variations on the client-server model: - The possibility of moving code from one process to another allows a process to delegate tasks to another process; for example, clients can download code from servers and run it locally. Objects and the code that accesses them can be moved to reduce access delays and minimize communication traffic. - Some distributed systems are designed to enable computers and other mobile devices to be added or removed seamlessly, allowing them to discover the available services and to offer their services to others. There are several widely used patterns for the allocation of work in a distributed system that have an important impact on the performance and effectiveness of the resulting system. The actual placement of the processes that make up a distributed system in a network of computers is also influenced by many detailed issues of performance, reliability, security and cost. The architectural models described here can provide only a somewhat simplified view of the more important patterns of distribution.