Distributed Application Architecture Patterns

10 Consistency Patterns

This chapter details patterns that help to ensure consistency in distributed systems.

  1. The Transaction-Based Processor in § 10.1 expands well-known database transaction to message processing

  2. The Transactional Outbox in § 10.2 ensures messages are sent if a database is updated

  3. The Saga pattern in § 10.3 shows a way how to manage distributed transactions, a notoriously difficult problem. It has two possible implementations:

    1. Choreography in § 10.4 where services communicate directly

    2. Orchestration in § 10.5 where a central service manages the process

  4. The Event Sourcing pattern in § 10.6, a well-known pattern that can also be used to simplify consistency in an event-driven architecture

Other patterns that could be considered a part of this category include:

Notable omissions in this category due to the methodology described in § 1 include: