List of architectural metapatterns

List of architectural metapatterns

Basic metapatterns

Basic metapatterns are both widespread stand-alone architectures and building blocks for more complex systems. They comprise the single-component monolithic architecture and the results of its division along each axis of coordinates (abstractness, subdomain and sharding):

Monolith


Article content


Monolith is a single-component system, the simplest possible architecture. It is easy to write but hard to evolve and maintain.

Includes: Reactor, Proactor, Half-Sync/Half-Async.

Shards


Article content

Shards are multiple instances of a monolith. They scale but usually require an external component for coordination.

Includes: Instances, Cells (Amazon definition); Sharding, Create on Demand, Pool.

Layers


Article content

Layers contain a component per level of abstractness. The layers may vary in technologies and forces and scale individually.

Includes: Multitier Architecture.

Services


Article content

Services divide the system by subdomain, often resulting in parts of comparable size to be assigned to dedicated teams. However, a system of services is hard to synchronize or debug.

Includes: Domain Services; Service-Based Architecture, Modular Monolith (Modulith), Microservices, device drivers, actors.

Pipeline


Article content

Pipeline is a kind of Services with unidirectional flow. Each service implements a single step of request processing. The system is flexible but may grow out of control.

Includes: Pipes and Filters, Choreographed Event-Driven Architecture, Nanoservices.

Extension metapatterns

These patterns extend services, shards or even a monolith with a layer that provides an aspect or two of the system’s behavior and often glues other components together.

Middleware


Article content

A middleware is a layer that implements communication between instances of the system’s components and may also manage the instances. This way each instance is relieved of the need to track other instances it deals with.

Includes: (Message) Broker, Deployment Manager.

Shared Repository


Article content

A shared repository stores the system’s data, maintains its integrity through transactions and may support subscriptions to changes in subsets of the data. That lets other system components concentrate on implementing the business logic.

Includes: Shared Database, Blackboard, Data Grid of Space-Based Architecture, shared memory, shared file system.

Proxy


Article content

A proxy mediates between the system and its clients, transparently taking care of some generic functionality.

Includes: Firewall, Response Cache, Load Balancer, Reverse Proxy, Adapter.

Orchestrator


Article content

An orchestrator implements use cases as sequences of calls to the underlying components, which are usually left unaware of each other’s existence.

Includes: Workflow Owner, Application Layer, Facade, Mediator; API Composer, Process Manager, Saga Execution Component, Integration (Micro-)Service.

Multifunctional components

Several patterns combine functionality of two or more extension layers.

Includes: Message Bus, API Gateway, Event Mediator, Enterprise Service Bus, Service Mesh, Middleware of Space-Based Architecture.

Fragmented metapatterns

There are patterns with no system-wide layers. Some of them incorporate two or three domains at various abstraction levels, so that a service (limited to a subdomain) in one domain acts as a layer for another domain.

Layered Services


Article content

Layered Services is an umbrella metapattern which highlights implementation details of Services or Pipeline.

Includes: orchestrated three-layered services, choreographed two-layered services, Command Query Responsibility Segregation (CQRS).

Polyglot Persistence


Article content

Polyglot Persistence is about using multiple data stores which differ in roles or technologies. Each of the upper-level components may have access to any data store. Each data store is a shared repository.

Includes: specialized databases, private and shared databases, data file, Content Delivery Network (CDN); read-only replica, Reporting Database, Memory Image, Query Service, search index, historical data, Cache-Aside.

Backends for Frontends


Article content

Backends for Frontends has a service (BFF) for each type of the system’s client. The BFF may be a proxy, orchestrator or both. Each BFF communicates with all the components below it. The pattern looks like multiple proxies or orchestrators deployed together.

Includes: Layered Microservice Architecture.

Service-Oriented Architecture


Article content

SOA has three or four layers of services, each in its own domain. The upper layer contains orchestrators which are often client-specific, like BFFs. The second layer contains business rules and is divided by the business subdomains. The lower layer(s) are libraries and utilities, grouped by functionality and technologies. Each component may use (orchestrates) all the components below it.

Includes: Segmented Architecture; distributed monolith, enterprise SOA.

Hierarchy


Article content

Some domains allow for hierarchical composition where the functionality is spread over a tree of components.

Includes: Orchestrator of Orchestrators, Bus of Buses, Cell-Based (Microservice) Architecture (WSO2 version) (Services of Services).

Implementation metapatterns

Several patterns emerge in the internal structure of components.

Plugins


Article content

The Plugins pattern is about separating the main logic from customizable details of the system’s behavior. That allows for the same code to be used for multiple flavors or customers.

Includes: Plug-In Architecture, Add-ons, Strategy, Hooks.

Hexagonal Architecture


Article content

Hexagonal Architecture is a specialization of Plugins where every external dependency is isolated behind an adapter and thus is easy to update or replace.

Includes: Ports and Adapters, Onion Architecture, Clean Architecture; Model-View-Controller (MVC).

Microkernel


Article content

This is another derivation of Plugins, with a rudimentary core component which mediates between resource consumers (applications) and resource providers. The microkernel is a middleware to the applications and an orchestrator to the providers.

Includes: operating system, software framework, distributed runtime, interpreter, configuration file, saga engine, AUTOSAR Classic Platform.

Mesh


Article content

A mesh consists of intercommunicating shards, each of which may host an application. The shards make a fault-tolerant distributed middleware.

Includes: grid; peer-to-peer networks, Leaf-Spine Architecture, actors, Service Mesh, Space-Based Architecture.

To view or add a comment, sign in

More articles by 🧿 🟨Saral Saxena 🧑‍💻🏆

  • Run .http Files in a Intellij idea

    When developing APIs in a Spring Boot project, testing endpoints is a crucial part of the workflow. Tools like Postman…

  • Mastering API Versioning in Spring Boot: Stop Breaking Your Endpoints

    Introduction API versioning is one of the most overlooked yet critical aspects of API development. Many developers…

  • Blazing Fast Performance in Spring Boot 3 with CDS

    Spring Boot 3 brings several performance optimizations, but one of the most exciting ones is Class Data Sharing (CDS)…

  • Java 21 Docker Optimization

    Java 21 introduces significant improvements and features, particularly in containerization. This article explores five…

  • Java Optimization: 7000ms → 90ms

    When working with two separate lists and trying to match data based on a common id, many developers often default to…

  • Spring Boot Red Flags

    Spring Boot is a powerful framework designed to simplify Java application development by offering production-ready…

  • Stop Writing != null

    Null pointer exceptions are a familiar pain point in Java development. The go-to solution for many developers? Add a…

  • Spring boot Apps getting optimized

    Before making any changes, established clear performance baselines. Here’s what our initial metrics looked like:…

  • Validating Payloads with Spring Boot 3.4.0

    First, let’s examine a controller that receives a object. This object contains fields such as: first name, last name…

  • Limitations of Java Executor Framework.

    The Java Executor Framework has inherent limitations that affect its performance in high-throughput, low-latency…

Insights from the community

Others also viewed

Explore topics