Logo di Distributed Systems Patterns

Distributed Systems Patterns

Community
peterbamuhigire
distributed-systems-patterns

Use when designing or reviewing multi-service, message-driven, or eventually consistent systems. Covers service boundaries, consistency tradeoffs, event workflows, outbox and inbox patterns, sagas, ordering, and idempotency.

Add to TypingMind

Panoramica

Pubblicato dapeterbamuhigire
Repositorychwezi-dev-engine
Nome della skilldistributed-systems-patterns
Stelle
29
Fork
6
File inclusi
4
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 4

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da peterbamuhigire su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Distributed Systems Patterns in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/peterbamuhigire/chwezi-dev-engine/tree/main/skills/architecture/distributed-systems-patterns
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/peterbamuhigire/chwezi-dev-engine.git /tmp/chwezi-dev-engine
mkdir -p .claude/skills
cp -r /tmp/chwezi-dev-engine/skills/architecture/distributed-systems-patterns .claude/skills/distributed-systems-patterns
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Distributed Systems Patterns in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Distributed Systems Patterns non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Distributed Systems Patterns non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Distributed Systems Patterns

Acknowledgement: Shared by Peter Bamuhigire, techguypeter.com, +256 784 464178.

Use When

  • Use when designing or reviewing multi-service, message-driven, or eventually consistent systems. Covers service boundaries, consistency tradeoffs, event workflows, outbox and inbox patterns, sagas, ordering, and idempotency.

Do Not Use When

  • The change is a single-process transaction with no remote dependency, asynchronous delivery, or independently failing component.
  • The task is mainly service decomposition or API shape; use system-architecture-design or api-design-first and return here for cross-boundary failure semantics.

Required Inputs

InputRequiredWhy it matters
Workflow steps and system boundariesyesIdentifies where atomicity ends and partial failure begins
Delivery, ordering, and consistency requirementsyesDetermines idempotency, sequencing, and reconciliation choices
Failure and recovery expectationsyesSets timeout, retry, compensation, and operator intervention rules
Throughput and latency constraintsconditionalTests whether the coordination pattern is viable

Workflow

Draw state transitions and ownership boundaries, enumerate failure windows, choose consistency and coordination patterns, define idempotency and recovery, then verify duplicate, reordered, delayed, and partially applied events.

Quality Standards

Every remote interaction has a timeout and failure policy. Every retried side effect has an idempotency rule. Consistency claims state their scope, and recovery does not assume exactly-once delivery.

Outputs

OutputConsumerAcceptance condition
Distributed workflow modelArchitecture and implementation teamsShows state ownership, message boundaries, consistency guarantees, and failure windows
Failure-handling contractService ownersDefines timeout, retry, deduplication, compensation, replay, and reconciliation behavior
Verification scenariosTest and operations teamsCover duplicates, reordering, concurrency, dependency outage, and partial completion

Evidence Produced

CategoryArtifactFormatExample
OperabilityService consistency and idempotency noteMarkdown doc covering chosen consistency model, idempotency keys, and saga sequencesdocs/dist/consistency-note-checkout.md
OperabilityFailure-mode catalogueMarkdown doc listing partition, retry, and replay failure modes with mitigationsdocs/dist/failure-modes-checkout.md

References

  • Use the references/ directory for deep detail after reading the core workflow below.
  • Load references/event-driven-architecture.md for event choreography, event contracts, brokers, and asynchronous workflow design.
  • Load references/realtime-systems.md for WebSocket, SSE, pub/sub, and realtime delivery concerns.

Use this skill when a design crosses process, service, queue, or region boundaries. The goal is to keep distributed complexity deliberate and bounded rather than accidental.

Load Order

  1. Load world-class-engineering.
  2. Load system-architecture-design first for the overall shape.
  3. Load this skill only when the system genuinely needs multiple services, asynchronous workflows, or weakly consistent boundaries.

Decision Workflow

1. Justify Distribution

State why distribution is necessary:

  • team ownership and release independence
  • scaling asymmetry
  • fault isolation
  • compliance or tenancy isolation
  • long-running or bursty workflows

If none of these are strong, prefer a modular monolith.

2. Define Boundaries and Contracts

For each service or asynchronous component, define:

  • owned data
  • API or event contracts
  • consistency expectation
  • failure effect on upstream and downstream flows
  • observability and ownership requirements

3. Choose Interaction Patterns

Use:

  • synchronous calls when the caller needs immediate confirmation
  • messaging when work is slow, bursty, or naturally eventual
  • outbox and inbox patterns when reliability across boundaries matters
  • sagas or compensations when one business workflow spans multiple durable states

4. Design Consistency and Recovery

Make explicit:

  • source of truth
  • ordering requirements
  • deduplication strategy
  • reconciliation path
  • timeout and retry policy
  • compensation or manual repair path

5. Prove the Design

Before calling it production-ready, provide:

  • consistency model
  • failure-mode examples
  • idempotency and replay notes
  • contract evolution rules
  • operational signals for stuck or divergent workflows

Non-Negotiable Standards

Service Boundaries

  • Each service owns its data and rules.
  • Do not share databases across services as a convenience.
  • Keep contracts narrow and versionable.
  • Avoid chatty request chains on critical paths.

Messaging

  • Assume at-least-once delivery unless proven otherwise.
  • Design consumers to be idempotent and replay-safe.
  • Define ordering needs explicitly; unordered by default is safer to assume.
  • Include correlation IDs and causation metadata.

Consistency

  • Strong consistency has operational cost; use it where business correctness needs it.
  • Eventual consistency requires visible user and operator handling.
  • If divergence is possible, define reconciliation before shipping.

Sagas and Compensation

  • Use compensation when the workflow spans multiple irreversible boundaries.
  • Compensation must be explicit, auditable, and tested.
  • Never describe a workflow as atomic if it crosses systems that cannot commit atomically.

Deliverables

For distributed-system work, produce:

  • service and ownership map
  • contract list
  • consistency decision table
  • event and retry flow notes
  • reconciliation or compensation plan
  • stuck-workflow and replay detection signals

Review Checklist

  • Distribution is justified by real constraints.
  • Data ownership is explicit and not undermined by shared persistence shortcuts.
  • Idempotency and replay behavior are defined.
  • Ordering assumptions are explicit.
  • Consistency and compensation strategy match business risk.
  • Operational detection exists for stuck, duplicated, or divergent workflows.

References

Capability contract

Model boundaries, messages, and failure semantics by default. Do not provision brokers, replay events, or mutate production state unless explicitly authorised.

Degraded mode

If topology or failure evidence is unavailable, return a read-only pattern comparison and assumptions register; withhold recommendations dependent on unknown delivery guarantees.

Domain Anti-Patterns

  • Assuming exactly-once delivery. Fix: define idempotency and deduplication.
  • Sharing one database across autonomous services. Fix: assign data ownership.
  • Publishing before the state change commits. Fix: use a transactional outbox.
  • Retrying non-idempotent commands blindly. Fix: add keys and retry limits.
  • Omitting poison-message handling. Fix: define dead-letter and replay controls.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Distributed Systems Patterns?

Use when designing or reviewing multi-service, message-driven, or eventually consistent systems. Covers service boundaries, consistency tradeoffs, event workflows, outbox and inbox patterns, sagas, ordering, and idempotency.

Perché usare Distributed Systems Patterns su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Distributed Systems Patterns è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Distributed Systems Patterns in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/peterbamuhigire/chwezi-dev-engine/tree/main/skills/architecture/distributed-systems-patterns. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Distributed Systems Patterns?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Distributed Systems Patterns?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Distributed Systems Patterns: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Distributed Systems Patterns è gratuita?

Sì. È pubblicata su GitHub da peterbamuhigire con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇