Types of Architecture Patterns
Learn about different types of architectural patterns.
Overview
There are three different categories of structures in architectural design, although they highlight different aspects of the same design. These include:
- Static or module structures
- Dynamic structures aka component and connector structures
- Deployment structures aka allocation structures
Static structures
The main objective of static structures (or module structures) is to assign different areas of functional responsibility. They discuss how the system is to be structured based on codes. In static structures, we also look at the relationship between different modules (e.g., inheritance or composition).
The module structures include the following:
Decomposition
Larger and more complex modules are divided into smaller and easily manageable modules. They essentially follow a top-down approach: we start with one big module, discussing all the tasks that our system has to do, and then we decompose modules into sub-modules based on different functionalities.
Uses
Another important part of the structure is the uses relation, which describes whether one module uses some part of the other. This allows for incremental development of the software.
Layered
Controlling the uses connection can result in distinct levels inside a system, where a layer is a collection of linked functions. Layers (meant as abstractions) hide implementation details from the levels above. A layer N can only access the services offered by layer N - 1.
Class
The module units are known as classes. Inheritance and composition relationships are defined here, allowing us to reuse different components of the classes and also helping in incremental development by adding functionality in an incremental way.
Dynamic structures
Dynamic structures, also known as component and connector (C&C) structures, explain how the system will be constructed as a collection of elements with runtime behavior (components) and interaction (connectors). Components are the primary units of computing, whereas connectors are the method through which distinct components communicate with one another. We’ll also talk about where the data is going to be kept, what portions of the system are (or can be) duplicated, whether or not various sections of the system can operate in parallel, and how the structure of a system evolves as it runs.
Dynamic (C&C) structures are comprised of:
Communication process
This process handles the dynamic characteristics of a system. Different units are connected via communication, synchronization, and/or exclusion operations. In C&C, the relationship between different components and connectors is known as an attachment.
Concurrency
In C&C structures, we can explore opportunities for parallelism within the system and exploit them where we can. The units are known as logical threads. The concurrency aspect is used early to manage issues related to concurrency easily.
Shared data
This structure contains composites and connectors that are related to database repositories (or shared data). It shows how data is produced, processed, and consumed by different modules of the software system.
Client-server
This technique is used if the system requires a group of clients and servers to communicate with each other. In the client-server technique, the components are the different clients and servers, whereas the connectors are the messages and protocols that are shared for the system to work properly.
Deployment structures
Deployment structures, also known as allocation structures, describe how the system will interact with non-software structures in its surroundings. They depict the interaction between software elements and elements in one (or more) external environments where the program will be developed and performed. The following are included in the deployment structure:
Deployment
This structure describes how a software component interacts with hardware and communication elements.
Implementation
Implementation structures exhibit how different software components are integrated with file structures. This is important for the management phase of a software lifecycle model in general.
Work assignment
In this structure, the implementation and integration details of modules are assigned to appropriate development teams. The work of each team is clearly defined as part of the architecture.
Conclusion
Patterns may be classified based on the predominant type of components that they display. As the name implies, the module patterns depict modules, the component and connection patterns depict components and connectors, and the allocation patterns depict a combination of software elements (modules, components, and connectors) and non-software elements.
In literature, most of the work done is on C&C patterns. However, there are module patterns and allocation patterns as well. We need to remember that these different patterns show different angles of the same system. So, it’s possible that architectural style X can be classified as a module structure or a C&C structure.