Architectural Patterns

Architectural Patterns

This post is a cross-post from www.ModernesCpp.com.

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.

No alt text provided for this image

Modernes C++ Mentoring

Stay informed:

Subscribe via E-Mail.

POSA

The Pattern-Oriented Software Architecture series (POSA) is a precious source of architectural patterns. It consists of five books:

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.

  • 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.

?

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, Animus24, Jozo Leko, John Breland, Venkat Nandam, Jose Francisco, Douglas Tinkham, Kuchlong Kuchlong, Robert Blanch, Truels Wissneth, Kris Kafka, 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, Matthieu Bolt, Stephen Kelley, Kyle Dean, Tusar Palauri, Dmitry Farberov, Juan Dent, George Liao, Daniel Ceperley, Jon T Hess, Stephen Totten, Wolfgang Fütterer, Matthias Grün, Phillip Diekmann, Ben Atakora, and Ann Shatoff.

?

Thanks in particular to Jon Hess, Lakshman, Christian Wittenhorst, Sherhy Pyton, Dendi Suhubdy, Sudhakar Belagurusamy, Richard Sargeant, Rusty Fleming, John Nebel, Mipko, Alicja Kaminska, and Slavko Radman.

My special thanks to Embarcadero, PVS-Studio, and Tipi.build.

Seminars

I'm happy to give online seminars or face-to-face seminars worldwide. Please call me if you have any questions.

Bookable (Online)

German

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++

New

  • Clean Code with Modern C++
  • C++20

Contact Me

Modernes C++,

No alt text provided for this image

要查看或添加评论,请登录

社区洞察

其他会员也浏览了