Engineering library

Patterns, without the hype.

Start from a failure or constraint. Add the smallest pattern that addresses it, and know when not to use it.

Pattern01

Idempotency Keys

Make retried commands return one durable outcome.

Tradeoffs included
Pattern02

Outbox Pattern

Commit a domain change and a message-to-publish together.

Tradeoffs included
Pattern03

Saga Pattern

Coordinate a long workflow through compensatable local transactions.

Tradeoffs included
Pattern04

Optimistic Locking

Reject stale writes with a version precondition.

Tradeoffs included
Pattern05

Pessimistic Locking

Serialize a short critical section with database row locks.

Tradeoffs included
Pattern06

Retry with Backoff

Retry transient work without amplifying an outage.

Tradeoffs included
Pattern07

Circuit Breaker

Stop spending resources on a dependency that is persistently failing.

Tradeoffs included
Pattern08

Rate Limiting

Bound resource use and abuse across meaningful identities.

Tradeoffs included
Pattern09

Cache Aside

Read through an application-managed cache while keeping a durable source of truth.

Tradeoffs included
Pattern10

CQRS

Use separate command and read models when their needs truly diverge.

Tradeoffs included
Pattern11

Event Sourcing

Persist domain events as the primary state history.

Tradeoffs included
Pattern12

Webhooks

Deliver signed at-least-once events between independently operated systems.

Tradeoffs included
Pattern13

Distributed Locks

Coordinate across owners only when database constraints or partition ownership cannot.

Tradeoffs included
Pattern14

Pagination

Traverse changing datasets with stable keyset cursors.

Tradeoffs included
Pattern15

Multi-tenancy

Make tenant ownership explicit in identity, schema, authorization, caches, and operations.

Tradeoffs included
Pattern16

Background Jobs

Run durable, retryable work outside an interactive request.

Tradeoffs included
Pattern17

Audit Logs

Record who did what, to which object, when, and why.

Tradeoffs included