Patterns of Distributed Systems Link to heading

Based on: Catalog of Patterns of Distributed Systems by Unmesh Joshi (published on martinfowler.com, Nov 2023)


Table of Contents Link to heading

  1. How Patterns Fit Together — A Layered View

1. How Patterns Fit Together — A Layered View Link to heading

The patterns are not independent. They compose into complete systems:

Example: A Raft-based Key-Value Store Link to heading

┌─────────────────────────────────────────────────────────┐
│                   CLIENT API                            │
│    Idempotent Receiver + Request Waiting List           │
├─────────────────────────────────────────────────────────┤
│                NETWORK LAYER                            │
│  Single-Socket Channel + Request Pipeline + Batching    │
├─────────────────────────────────────────────────────────┤
│              CONSENSUS LAYER (Raft)                     │
│  Leader & Followers + Generation Clock + Majority Quorum│
│  + Replicated Log + High-Water Mark                     │
├─────────────────────────────────────────────────────────┤
│             FAILURE DETECTION                           │
│  HeartBeat + Lease                                      │
├─────────────────────────────────────────────────────────┤
│               STORAGE LAYER                             │
│  Write-Ahead Log + Segmented Log + Low-Water Mark       │
│  + Versioned Value                                      │
└─────────────────────────────────────────────────────────┘

Example: A Cassandra-style Eventually Consistent Store Link to heading

┌─────────────────────────────────────────────────────────┐
│               CLIENT INTERFACE                          │
│   Follower Reads + Idempotent Receiver                  │
├─────────────────────────────────────────────────────────┤
│             DATA DISTRIBUTION                           │
│   Fixed Partitions + Gossip Dissemination               │
├─────────────────────────────────────────────────────────┤
│            CONFLICT RESOLUTION                          │
│   Version Vector + Versioned Value + Hybrid Clock       │
├─────────────────────────────────────────────────────────┤
│               FAILURE DETECTION                         │
│   HeartBeat + Gossip                                    │
├─────────────────────────────────────────────────────────┤
│                STORAGE                                  │
│   Write-Ahead Log + Segmented Log                       │
└─────────────────────────────────────────────────────────┘