
The Saga Pattern for Distributed Transactions
How to implement the saga pattern for distributed transactions across microservices: orchestration versus choreography, in TypeScript, with compensation.
Categories
Systems & patterns · 40 articles · Page 3 of 4

How to implement the saga pattern for distributed transactions across microservices: orchestration versus choreography, in TypeScript, with compensation.

How to implement hexagonal architecture (ports and adapters) in a real application: clear boundaries, dependency inversion and a testable core domain.

How to design a plugin system that lets users extend your application without touching its core: plugin interfaces, lifecycle hooks, resolution, sandboxing.

A practical guide to consensus algorithms: Raft, Paxos and leader election, with real examples of when and why distributed systems need them.

A practical guide to event sourcing — when to use it, how to implement event stores, build projections, handle schema evolution, and avoid common pitfalls.

How API gateways handle routing, authentication, rate limiting and response aggregation — and how to build or choose the right one.

A comparison of threading, async/await, and actor-based concurrency models — when each fits, their tradeoffs, and how to avoid common pitfalls.

How to implement timeouts, retries, and backoff strategies that prevent cascading failures in distributed architectures.

A service mesh moves networking concerns like retries, circuit breaking, mTLS, and observability out of application code and into the infrastructure layer.

When a downstream service is failing, continuing to send requests makes everything worse — the circuit breaker pattern stops the cascade by failing fast.

Command Query Responsibility Segregation uses separate models for reads and writes — when that solves a real problem, and when it is needless complexity.

Entities, value objects, aggregates, and bounded contexts — the DDD patterns that keep complex business logic organized without over-engineering simple systems.