Design goals: maintainability,
flexibility, portability
Architectural Style vs. Architecture
- Subsystem decomposition: identification of subsystems, services, and their relationships to each other
- Architectural Style: a pattern for a subsystem decomposition
- Software Architecture: instance of an architectural style
Client-Server Architecture
Often used in the design of database systems
- Client: user application
- Server: database access and manipulation
- Client requests a service from the server
Portability
High performance
Reliability
Scalability
Flexibility
Functions performed by the client
- Input by the user (customized user interface)
- Sanity checks of input data
Functions performed by the server
- Centralized data management
- Provision of data integrity and database consistency
- Provision of database security

- One or more servers provide services to clients
- Each client calls a service offered by the server
- Server performs service and returns result to client
- Client knows interface of the server
- Server does not know the interface of the client
- Response is typically immediate (i.e. less than a few seconds)
- End users interact only with the client
Problems

- Client server systems use a request-response protocol
- Peer to peer communication is often needed
Example: a database must process queries from application 1 and should be able to send notifications to application 2 when data in the database has changed
Peer to peer Architectural Style
- Generalization of the client server architectural style
- Clients can be servers and servers can be clients

Layered Architectural Style

- A layer is a subsystem that provides a service to another subsystem with the following restrictions
- A layer only depends on services from lower layers
- A layer has no knowledge of higher layers
Closed architecture (opaque layering)
A layered architecture is closed, if each layer can only call operations from the layer directly below (also called “direct addressing”)

Design goals: maintainability, flexibility, portability
more portable → low coupling , but potentially a bottleneck
Open architecture (transparent layering)
A layered architecture is open, if a layer can call operations from any layer below (also called “indirect addressing”)

Design goals: high performance, real-time operations support
more efficient → high coupling :(
3 layered architectural style
Often used for the development of web applications
Example
- The web browser implements the user interface
- The web server serves requests from the web browser
- The database manages and provides access to the persistent data
4 layered architectural style
Hierarchically ordered layers
Example
- A web browser provides the user interface
- A web server serves static HTML requests
- An application server provides session management (for example the contents of an electronic shopping cart) and processes dynamic HTML requests
- A database manages and provides access to the persistent data
→ If these layers reside on different hardware nodes, then it is a 4 tier architecture
Layer vs. tier
- 3 layered architectural style: an architectural style where an application consists of 3 hierarchically ordered layers
- 3 tier architecture: a software architecture where the 3 layers are allocated on 3 separate hardware nodes
- Note: Layer is a type (e.g. class, subsystem) and tier is an instance (e.g. object, hardware node)