Architectural Patterns
Architectural patterns describe the fundamental structure of a software system and are often based on design patterns. The five Pattern-Oriented Software Architecture series books provide a precious source of architectural patterns.
Let me start with the big picture: what is the difference between an architectural pattern, a design pattern, and an idiom?
Architectural Patterns, Design Patterns, and Idioms
The main difference between architectural patterns, Design Patterns, and Idioms is their structural categorization based on their scale and abstraction:
- Architectural patterns describe the fundamental structure of the entire software system. They are often based on design patterns.
- Design patterns define the components’ interaction and focus on subsystems.
- An idiom is implementing an architecture or design pattern in a concrete programming language. The popular idiom in C++ is Resource Acquisition Is Initialization (RAII). Container, smart pointers, and locks model them.
Let me bring my thoughts about architectural patterns, design patterns, and idioms to the point:
- The structural categories go from abstract to concrete. Idioms are the most concrete ones.
- They’re acting on the macro level (architectural patterns), micro-level (design patterns), and programming language (idioms).
- Architectural patterns focus on the system, design patterns subsystems, and idioms programming language.
POSA
The Pattern-Oriented Software Architecture series (POSA) is a precious source of architectural patterns. It consists of five books:
- Pattern-Oriented Software Architecture, Volume 1 by Frank Buschmann, Regine Meunier, Hans Rohnert, Peter Sommerlad, and Michael Stal (POSA 1)
- Pattern-Oriented Software Architecture, Volume 2: Patterns for Concurrent and Networked Objects) by Douglas C. Schmidt, Michael Stal, Hans Rohnert, and Frank Buschmann (POSA 2)
- Pattern-Oriented Software Architecture, Volume 3: Patterns for Resource Management by Michael Kirchner, and Prashant Jain (POSA 3)
- Pattern-Oriented Software Architecture, Volume 4: A Pattern Language for Distributed Programming by Frank Buschmann, Kevlin Henney, and Douglas C. Schmidt (POSA 4)
- Pattern-Oriented Software Architecture, Volume 5: Patterns and Pattern Language by Frank Buschmann, Kevlin Henney, and Douglas C. Schmidt (POSA 5)
I will present in my posts seven very often used architectural patterns: Layers, Pipes-and-Filters, Broker, Model-View-Controller (MVC), Reactor, Active Object, and Monitor Object.
POSA 1 provides the first classification:
From Mud to Structure
These patterns provide a controlled decomposition of an overall system task into cooperating subsystems.
Modernes C++ Mentoring
Do you want to stay informed: Subscribe.
- Layers: Split a task into layers. Each layer has a specific responsibility and provides a service to a higher layer.
- Pipes and Filters: Decompose a task that performs complex processing into a series of separate elements that can be reused. This can improve performance, scalability, and reusability by allowing task elements that perform the processing to be deployed and scaled independently. (https://docs.microsoft.com/en-us/azure/architecture/patterns/pipes-and-filters)
Distributed Systems
Build systems whose components are located in different processes or address spaces.
- Broker: Structures distributed software systems that interact with remote service invocations. It is responsible for coordinating the communication, its results, and exceptions.
Interactive Systems
Build a system with human-computer interaction.
- Model-View-Controller (MVC): Divides the program logic of a user interface into the separate components model, view, and controller. The model manages the data and rules of the application. The view represents the data, and the controller interacts with the user.
POSA 2 added further classifications:
Event Demultiplexing and Dispatching
Initiate, receive, demultiplex, and dispatch events in distributed and network systems.
- Reactor: An event-driven application that can accept multiple client requests simultaneously and distribute them to different service providers.
Concurrency Patterns
Addresses concurrency architecture and design issues for components, subsystems, and applications.
- Active Object: Separates the method execution from the method call.
- Monitor Object: Synchronizes access to an object so that only one member function can be executed at any time.
What’s Next?
After this overview of the POSA books and their pattern, I will present the architectural pattern Layers in my next post.
{module title=”Marketing”}
Thanks a lot to my Patreon Supporters: Matt Braun, Roman Postanciuc, Tobias Zindl, G Prvulovic, Reinhold Dröge, Abernitzke, Frank Grimm, Sakib, Broeserl, António Pina, Sergey Agafyin, Андрей Бурмистров, Jake, GS, Lawton Shoemake, Jozo Leko, John Breland, Venkat Nandam, Jose Francisco, Douglas Tinkham, Kuchlong Kuchlong, Robert Blanch, Truels Wissneth, Mario Luoni, Friedrich Huber, lennonli, Pramod Tikare Muralidhara, Peter Ware, Daniel Hufschläger, Alessandro Pezzato, Bob Perry, Satish Vangipuram, Andi Ireland, Richard Ohnemus, Michael Dunsky, Leo Goodstadt, John Wiederhirn, Yacob Cohen-Arazi, Florian Tischler, Robin Furness, Michael Young, Holger Detering, Bernd Mühlhaus, Stephen Kelley, Kyle Dean, Tusar Palauri, Juan Dent, George Liao, Daniel Ceperley, Jon T Hess, Stephen Totten, Wolfgang Fütterer, Matthias Grün, Phillip Diekmann, Ben Atakora, Ann Shatoff, Rob North, Bhavith C Achar, Marco Parri Empoli, Philipp Lenk, Charles-Jianye Chen, Keith Jeffery,and Matt Godbolt.
Thanks, in particular, to Jon Hess, Lakshman, Christian Wittenhorst, Sherhy Pyton, Dendi Suhubdy, Sudhakar Belagurusamy, Richard Sargeant, Rusty Fleming, John Nebel, Mipko, Alicja Kaminska, Slavko Radman, and David Poole.
My special thanks to Embarcadero | |
My special thanks to PVS-Studio | |
My special thanks to Tipi.build | |
My special thanks to Take Up Code | |
My special thanks to SHAVEDYAKS |
Seminars
I’m happy to give online seminars or face-to-face seminars worldwide. Please call me if you have any questions.
Standard Seminars (English/German)
Here is a compilation of my standard seminars. These seminars are only meant to give you a first orientation.
- C++ – The Core Language
- C++ – The Standard Library
- C++ – Compact
- C++11 and C++14
- Concurrency with Modern C++
- Design Pattern and Architectural Pattern with C++
- Embedded Programming with Modern C++
- Generic Programming (Templates) with C++
- Clean Code with Modern C++
- C++20
Contact Me
- Mobil: +49 176 5506 5086
- Mail: schulung@ModernesCpp.de
- German Seminar Page: www.ModernesCpp.de
- Mentoring Page: www.ModernesCpp.org
Modernes C++ Mentoring,
Leave a Reply
Want to join the discussion?Feel free to contribute!