Architectural Metapatterns
Free!
Minimum price
$7.99
Minimum paid price

Architectural Metapatterns

The Pattern Language of Software Architecture

About the Book

What this book is:

  • A compendium of one or two hundred architectural patterns.
  • A classification (taxonomy) of architectural patterns.
  • The first large generic pattern language since volume 4 of Pattern-Oriented Software Architecture.
  • A step towards the ubiquitous language of software architecture.
  • Knowledge should be free. (Let’s all love FOSS!)

What this book is not:

  • A review of modern technologies.
  • A cookbook (decision tree) of ready-made recipes.
  • A guide through system design interviews.
  • A detailed pattern catalogue.
  • A polished commercial-grade textbook.
  • Share this book

  • Categories

    • Software Architecture
  • Feedback

    You must own a copy of this Book to access the forums.

    Email the Author(s)

About the Author

Denys Poltorak
Denys Poltorak

An unemployed programmer from Ukraine

Table of Contents

  • About this book
    • Structure of the book
    • The architectural religions
    • What’s wrong with patterns
    • TLDR
  • Metapatterns
    • Architectural patterns
    • Design space
    • Structure defines architecture
    • The system of coordinates
    • Map and reduce
    • An example of metapatterns
    • What does that mean
  • Modules and complexity
    • Concepts and complexity
    • Modules, encapsulation and bounded context
    • Coupling and cohesion
    • Development and operational complexity
    • Composition of modules
    • Forwarding and duplication
    • Summary
  • Forces, asynchronicity and distribution
    • Requirements and forces
    • Conflicting forces
    • Asynchronous communication
    • Distribution
    • The goods and the price
  • Control and processing software
    • Control and interactive systems
      • Autopilot
      • Telephony
      • Game
      • Similarities and differences
      • Digging into the code
    • Data processing systems
      • Video recorder
      • Scientific computation
      • Database query
      • Common features
      • What’s in the code
    • The middle ground
      • The origin of the distinction
      • Let’s mix!
      • Nothing special
      • Control but not real-time
      • Real-time but not control
      • Real-time data processing
    • Composition
      • Online store as an example
      • Revisiting a database
      • And in the silicon
    • Summary
  • Arranging communication
    • Orchestration
      • Roles
      • Dependencies
      • Mutual orchestration
      • Summary
    • Choreography
      • Early response
      • Dependencies
      • Multi-choreography
      • Summary
    • Shared data
      • Storage
      • Messaging
      • Full-featured
      • Summary
    • Comparison of the options
      • Monolith
      • Shards
      • Layers
      • Services
      • Pipeline
  • Monolith
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants by the internal structure
      • True Monolith, Big Ball of Mud
      • (misapplied) Layered Monolith
      • (misapplied) Modular Monolith (Modulith)
      • (inexact) Plugins and Hexagonal Architecture
    • Variants by the mode of action
      • Single-threaded Reactor (one thread, one task)
      • Multi-threaded Reactor (a thread per task)
      • Proactor (one thread, many tasks)
      • (inexact) Half-Sync/Half-Async (coroutines or fibers)
      • The state of the art
      • (inexact) (Re)Actor-with-Extractors (phased processing)
    • Evolutions
      • Evolutions to Shards
      • Evolutions to Layers
      • Evolutions to Services
      • Evolutions with Plugins
    • Summary
  • Shards
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants by isolation
      • Multithreading
      • Multiple processes
      • Distributed instances
    • Variants by state
      • Persistent slice: Sharding, Shards, Cells (Amazon definition), Partitions
      • Persistent copy: Replica
      • Stateless: Pool, Instances, Replicated stateless services, Work Queue
      • Temporary state: Create on demand
    • Evolutions
      • Evolutions of a sharded monolith
      • Evolutions that share data
      • Evolutions that share logic
    • Summary
  • Layers
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants by isolation
      • Synchronous layers, Layered Monolith
      • Asynchronous layers
      • A process per layer
      • Distributed tiers
    • Examples
      • Domain-Driven Design (DDD) Layers
      • Three-Tier Architecture
      • Embedded systems
    • Evolutions
      • Evolutions that make more layers
      • Evolutions that help large projects
      • Evolutions that improve performance
      • Evolutions to gain flexibility
    • Summary
  • Services
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants by isolation
      • Synchronous modules: Modular Monolith (Modulith)
      • Asynchronous modules: Modular Monolith (Modulith), Embedded Actors
      • Multiple processes
      • Distributed runtime: Function as a Service (FaaS) (including Nanoservices), Backend Actors
      • Distributed services: Service-Based Architecture, Space-Based Architecture, Microservices
    • Variants by communication
      • Direct method calls
      • RPCs and commands (request/confirm pairs)
      • Notifications (pub/sub) and shared data
      • (inexact) No communication
    • Variants by size
      • Whole subdomain: Domain Services
      • Part of a subdomain: Microservices
      • Class-like: Actors
      • Single function: FaaS, Nanoservices
    • Variants by internal structure
      • Monolithic service
      • Layered service
      • Hexagonal service
      • Scaled service
      • Cell (WSO2 definition) (service of services)
    • Examples
      • Service-Based Architecture
      • Microservices
      • Actors
      • (inexact) Nanoservices (API layer)
      • (inexact) Device Drivers
    • Evolutions
      • Evolutions that add or remove services
      • Evolutions that add layers
      • Evolutions of individual services
    • Summary
  • Pipeline
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants by scheduling
      • Stream processing, Neartime system
      • Batch processing, Offline system
    • Examples
      • Pipes and Filters, Workflow System
      • Choreographed (Broker Topology) Event-Driven Architecture (EDA)
      • Data Mesh
      • Function as a Service (FaaS), Nanoservices (pipelined)
    • Evolutions
    • Summary
      • Middleware
      • Shared Repository
      • Proxy
      • Orchestrator
      • Combined Component
  • Middleware
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants by functionality
      • By addressing (channels, actors, pub/sub)
      • By flow (notifications, request/confirm, RPC)
      • By delivery guarantee
      • By persistence
      • By structure (Microkernel, Mesh, Broker)
    • Examples of merging Middleware and other metapatterns
      • Message Bus
      • Service Mesh
      • Event Mediator
      • Enterprise Service Bus (ESB)
    • Evolutions
    • Summary
  • Shared Repository
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants
      • Shared Database, Data Domain, Service-Based Architecture
      • Blackboard
      • Data Grid of Space-Based Architecture (SBA), Replicated Cache
      • Shared memory
      • Shared file system
      • (inexact) Stamp Coupling
    • Evolutions
    • Summary
  • Proxy
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants by transparency
      • Full Proxy
      • Half-Proxy
    • Variants by placement
      • Separate deployment: Standalone
      • On the system side: Sidecar
      • On the client side: Ambassador
    • Variants by function
      • Firewall
      • Response Cache, Read-Through Cache, Write-Through Cache, Write-Behind Cache, Cache
      • Load Balancer, Sharding Proxy, Cell Router, Messaging Grid, Scheduler
      • Dispatcher, Reverse Proxy, Ingress Controller, Edge Service, Microgateway
      • Adapter, Anticorruption Layer, Open Host Service, Gateway, Message Translator, API Service, Cell Gateway, (inexact) Backend for Frontend, Hardware Abstraction Layer (HAL), Operating System Abstraction Layer (OSAL), Platform Abstraction Layer (PAL), Database abstraction layer (DBAL or DAL), Repository
      • API Gateway
    • Evolutions
    • Summary
  • Orchestrator
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants by transparency
      • Closed or strict
      • Open or relaxed
    • Variants by structure (can be combined)
      • Monolithic
      • Scaled
      • Layered
      • A service per client type (Backends for Frontends)
      • A service per subdomain (Hierarchy)
      • A service per use case (SOA-style)
    • Variants by function
      • API Composer, Remote Facade, Gateway Aggregation, Composed Message Processor, Scatter-Gather, MapReduce
      • Process Manager, Orchestrator
      • (Orchestrated) Saga, Saga Orchestrator, Saga Execution Component, Transaction Script, Coordinator
      • Integration (Micro-)Service, Application Service
    • Variants of composite patterns
      • API Gateway
      • Event Mediator
      • Enterprise Service Bus (ESB)
    • Evolutions
    • Summary
  • Combined Component
    • Performance
      • Dependencies
      • Applicability
    • Variants
      • Message Bus
      • API Gateway
      • Event Mediator
      • Front Controller
      • Enterprise Service Bus (ESB)
      • Service Mesh
      • Middleware of Space-Based Architecture
    • Evolutions
    • Summary
      • Layered Services
      • Polyglot Persistence
      • Backends for Frontends
      • Service-Oriented Architecture
      • Hierarchy
  • Layered Services
    • Performance
    • Variants
    • Orchestrated three-layered services
      • Dependencies
      • Relations
      • Evolutions
    • Choreographed two-layered services
      • Dependencies
      • Relations
      • Evolutions
    • Command Query Responsibility Segregation (CQRS)
      • Dependencies
      • Relations
      • Evolutions
    • Summary
  • Polyglot Persistence
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants with independent storage
      • Specialized databases
      • Private and shared databases
      • Data file, Content Delivery Network (CDN)
    • Variants with derived storage
      • Read-only replica
      • Reporting Database, CQRS View Database, Source-aligned (native) Data Product Quantum (DPQ) of Data Mesh
      • Memory Image, Materialized view
      • Query Service, Front Controller, Data Warehouse, Data Lake, Aggregate Data Product Quantum (DPQ) of Data Mesh
      • Search index
      • Historical data, Data archiving
      • Database cache, Cache-Aside
    • Evolutions
    • Summary
  • Backends for Frontends (BFF)
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants
      • Proxies
      • Orchestrators
      • Proxy + Orchestrator pairs
      • API Gateways
      • Event Mediators
    • Evolutions
    • Summary
  • Service-Oriented Architecture (SOA)
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants
      • Distributed Monolith
      • Enterprise SOA
      • (misapplied) Automotive SOA
      • Nanoservices
    • Evolutions
    • Summary
  • Hierarchy
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants by structure (may vary per node)
      • Polymorphic children
      • Functionally distinct children
    • Variants by direction
      • Top-down Hierarchy, Orchestrator of Orchestrators
      • Bottom-up Hierarchy, Bus of Buses, Network of Networks
      • In-depth Hierarchy, Cell-Based (Microservice) Architecture (WSO2 version), Segmented Microservice Architecture, Services of Services
    • Evolutions
    • Summary
      • Plugins
      • Hexagonal Architecture
      • Microkernel
      • Mesh
  • Plugins
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants
      • By the direction of control
      • By abstractness
      • By the direction of communication
      • By linkage
      • By granularity
      • By the number of instances
      • By execution mode
    • Summary
  • Hexagonal Architecture
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants by placement of adapters
      • Adapters on the external component side
      • Adapters on the core side
    • Examples
      • Model-View-Controller (MVC)
      • Hexagonal Architecture, Ports and Adapters
      • DDD-style Hexagonal Architecture, Onion Architecture, Clean Architecture
    • Summary
  • Microkernel
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants
      • Operating system
      • Software framework
      • Virtualizer, Hypervisor, Container Orchestrator, Distributed runtime
      • Interpreter, Script, Domain-Specific Language (DSL)
      • Configurator, Configuration file
      • Saga Engine
      • AUTOSAR Classic Platform
    • Summary
  • Mesh
    • Performance
      • Dependencies
      • Applicability
      • Relations
    • Variants
      • By structure
      • By connectivity
      • By the number of mesh layers
    • Examples
      • Peer-to-Peer Networks
      • Leaf-Spine Architecture, Spine-Leaf Architecture
      • Actors
      • Service Mesh
      • Space-Based Architecture
    • Summary
  • Comparison of architectural patterns
    • Sharing functionality or data among services
      • Direct call
      • Make a dedicated service
      • Delegate the aspect
      • Replicate it
      • Summary
    • Pipelines in architectural patterns
      • Pipes and Filters
      • Choreographed Event-Driven Architecture
      • Command Query Responsibility Segregation (CQRS)
      • Model-View-Controller (MVC)
      • Summary
    • Dependency inversion in architectural patterns
      • Patterns that build around it
      • Patterns that often rely on it
      • Patterns that may use it
      • Summary
    • Indirection in commands and queries
      • Command (OLTP) systems
      • Query (OLAP) systems
      • Summary
  • Ambiguous pattern names
    • Monolith
      • Reactor
      • Microkernel
      • Domain Services
      • Front Controller
      • Cells
      • Nanoservices
      • Summary
  • Architecture and product life cycle
    • Infancy (proof of concept) – monolith
      • Childhood (prototype) – layers
      • Youth (development of features) – fragmented architectures
      • Adulthood (production) – ad-hoc composition
      • Old age (support) – back to layers
      • Death (the ultimate release) – monolith
      • So it goes
      • Going back in time
  • Real-world inspirations for architectural patterns
    • Basic metapatterns
      • Monolith
      • Shards
      • Layers
      • Services
      • Pipeline
    • Extension metapatterns
      • Middleware
      • Shared Repository
      • Proxy
      • Orchestrator
    • Fragmented metapatterns
      • Polyglot Persistence
      • Backends for Frontends
      • Service-Oriented Architecture
      • Hierarchy
    • Implementation metapatterns
      • Plugins
      • Hexagonal Architecture
      • Microkernel
      • Mesh
    • Summary
  • Appendix A. Acknowledgements.
  • Appendix B. Books referenced.
  • Appendix C. Copyright.
    • Section 1 – Definitions.
    • Section 2 – Scope.
    • Section 3 – License Conditions.
    • Section 4 – Sui Generis Database Rights.
    • Section 5 – Disclaimer of Warranties and Limitation of Liability.
    • Section 6 – Term and Termination.
    • Section 7 – Other Terms and Conditions.
    • Section 8 – Interpretation.
  • Appendix D. Disclaimer.
  • Appendix E. Evolutions.
    • Monolith: to Shards
      • Implement a mesh of self-managed shards
      • Split data to isolated shards and add a load balancer
      • Separate the data layer and add a load balancer
      • Dedicate an instance to each client
      • Further steps
    • Monolith: to Layers
      • Divide into layers
      • Use a database
      • Add a proxy
      • Add an orchestrator
      • Further steps
    • Monolith: to Services
      • Divide into services
      • Add or split a service
      • Divide into a pipeline
      • Further steps
    • Monolith: to Plugins
      • Support plugins
      • Isolate dependencies with Hexagonal Architecture
      • Add an interpreter (support scripts)
    • Shards: share data
      • Move all the data to a shared repository
      • Use Space-Based Architecture
      • Add a shared repository for the coupled subset of the data
      • Split a service with the coupled data
    • Shards: share logic
      • Add a middleware
      • Add a load balancer
      • Move the integration logic to an orchestrator
    • Layers: make more layers
      • Split the business logic in two layers
    • Layers: help large projects
      • Divide the domain layer into services
      • Build event-driven architecture over a shared database
      • Build a top-down hierarchy
    • Layers: improve performance
      • Merge several layers
      • Shard individual layers
      • Use multiple databases
    • Layers: gain flexibility
      • Divide the orchestration layer into backends for frontends
    • Services: add or remove services
      • Add or split a service
      • Merge services
    • Services: add layers
      • Add a middleware
      • Use a service mesh
      • Use a shared repository
      • Add a proxy
      • Use an orchestrator
    • Pipeline:
      • Promote a service to Front Controller
      • Add an orchestrator
    • Middleware:
      • Add a secondary middleware
      • Merge two systems by building a bottom-up hierarchy
    • Shared Repository:
      • Shard the database
      • Use Space-Based Architecture
      • Move the data to private databases of services
      • Deploy specialized databases
    • Proxy:
      • Add another proxy
      • Deploy a proxy per client type
    • Orchestrator:
      • Subdivide to form layered services
      • Subdivide to form backends for frontends
      • Add a layer of orchestration
      • Form a hierarchy
    • Combined Component:
      • Divide into specialized layers
  • Appendix F. Format of a metapattern.
    • Diagram
      • Abstract
      • Performance
      • Dependencies
      • Applicability
      • Relations
      • Variants and examples
      • Evolutions
  • Appendix G. Glossary.
  • Appendix H. History of changes.
  • Appendix I. Index of patterns and architectures.

    The Leanpub 60 Day 100% Happiness Guarantee

    Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

    Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

    You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

    So, there's no reason not to click the Add to Cart button, is there?

    See full terms...

    Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

    We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

    (Yes, some authors have already earned much more than that on Leanpub.)

    In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.

    Learn more about writing on Leanpub

    Free Updates. DRM Free.

    If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

    Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

    Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

    Learn more about Leanpub's ebook formats and where to read them

    Write and Publish on Leanpub

    You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

    Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

    Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

    Learn more about writing on Leanpub