System Design
Architectural Styles
Client Server Architecture
Peer to Peer Architecture
• One or many servers provide services to instances of subsystems,
called clients
• Each client calls on the server, which performs some service and
returns the result
The clients know the interface of the server
The server does not need to know the interface of the client
• The response in general is immediate
• End users interact only with the client
• E.g An information system with a central database
Server
user requester provider
+service1()
Client * * +service2()
+serviceN()
• Often used in the design of database systems
• Front-end: User application (client)
• Back end: Database access and manipulation (server)
• Functions performed by client:
• Input from the user (Customized user interface)
• Front-end processing of input data
• Functions performed by the database server:
• Centralized data management
• Data integrity and database consistency
• Database security
Server runs on many operating systems
Service Portability
and many networking environments
Location- Server might itself be distributed, but
Transparency provides a single "logical" service to the
user
High Performance Client optimized for interactive display-
intensive tasks; Server optimized for CPU-
intensive operations
Scalability Server can handle large # of clients
Flexibility User interface of client supports a variety
of end devices (PDA, Handy, laptop,
wearable computer)
Reliability Server should be able to survive client and
communication problems
User
The Web as an instance of the client/server architectural style
(UML deployment diagram).
• Client/Server systems do not provide peer-to- peer communication
• Peer-to-peer communication is often needed
• Example:
• Database must process queries from application and should be able
to send notifications to the application when data have changed
application1:DBUser 1. updateData
database:DBMS
application2:DBUser 2. changeNotification
Generalization of Client/Server Architectural Style
Figure: Peer-to-peer architectural style (UML class diagram). Peers can request
services from and provide services to other peers.
Figure: An example of peer-to-peer architectural style (UML communication
diagram). The database server can both process requests from and send
notifications to applications.
Interface layer includes all boundary objects.
Application logic layer includes all control and entity objects.
Storage layer realizes the storage, retrieval, and query of persistent objects.
Figure: Three-tier architectural style (UML component diagram).
Objects are organized into three layers realizing the user interface, the processing, and the storage.
Four-tier architectural style is a three-tier architecture in which the Interface
layer is decomposed into a Presentation Client layer and a Presentation
Server layer.
For example, a banking information system can include a host of different
clients, such as a Web browser interface for home users, an Automated Teller
Machine, and an application client for bank employees.
Figure: Four-tier architectural style (UML component diagram). The Interface layer of
the three tier style is split into two layers to enable more Variability on the user interface
style.
Subsystems process data received from a set of inputs and send results to other
subsystems via a set of outputs.
The subsystems are called “filters,” and the associations between the subsystems are
called “pipes.”
Each filter knows only the content and the format of the data received on the input
pipes.
Each filter is executed concurrently, and synchronization is accomplished via
the pipes.
Suited for systems that apply transformations to streams of data without intervention
by users.
Figure: Pipe and filter architectural style (UML class diagram). A
Filter can have many inputs and outputs. A Pipe connects one of the
outputs of a Filter to one of the inputs of another Filter.
For example the pipe and filter architecture of a noise cancelation
system will be:
\
Bernd Bruegge & Alllen H. Dutoit- Object
Oriented Software Engineering- Using UML,
Patterns and Java