Message Mediated State Coordination¶
Let independent state holders coordinate by sending bounded, addressed messages through governed channels instead of reading or mutating one another directly.
Gap-fill disposition¶
- Target prime:
message_passing/ Message Passing - Queue position: 25
- Disposition:
draft_full_archetype - Drafted archetype slug:
message_mediated_state_coordination
Pre-draft disposition summary¶
The disposition check found no accepted full archetype, alias, recognized variant, component, mechanism, or duplicate-map entry that already covers the target prime's full structural meaning. Existing neighbors cover communication repair, handoff, queues, transactions, local rules, or channelization, but none covers the full pattern of autonomous private-state holders coordinating only through discrete addressed messages with explicit contracts, delivery semantics, handlers, failure rules, backpressure, and trace observability.
When This Archetype Applies¶
Complete catalog groundingAt least one sufficient condition set is fully represented by existing primes or domain-specific abstractions.
Diagnostic problem
Several autonomous actors, services, components, teams, devices, or institutions must influence one another while retaining private state and local control. Without a governed message substrate they either share state unsafely, depend on direct inspection, make hidden side effects, lose context at boundaries, block while waiting for synchronous access, or create causal chains that cannot be observed or recovered after delay, failure, reordering, duplication, or partial execution.
Applicability expression6 distinct conditions
groundedpartly groundedopen
6 conditions, all required.
6Required in every casenumbered 1–6
These hold no matter which pattern applies.
Private autonomous state · grounded
Autonomous participants hold private state that peers should neither inspect nor mutate directly.
The archetype is strongest when encapsulation, autonomy, privacy, fault isolation, or institutional independence matters. In this condition set, the requirement is: Autonomous participants hold private state that peers should neither inspect nor mutate directly.
primeMessage Passing— Autonomous holders of private state interact only through discrete addressed messages over intermediating channels.
Cross-boundary coordination · grounded
A coordination effect must cross the boundary between autonomous state holders.
A sender needs to request, command, notify, query, delegate, synchronize, or signal without sharing its internal substrate. In this condition set, the requirement is: A coordination effect must cross the boundary between autonomous state holders.
primeMessage Passing— Autonomous holders of private state interact only through discrete addressed messages over intermediating channels.
Unreliable asynchronous channels · grounded
Interaction is mediated by channels that may delay, duplicate, reorder, drop, retry, or route messages asynchronously.
A message design must state what these conditions mean rather than letting them become accidental behavior. In this condition set, the requirement is: Interaction is mediated by channels that may delay, duplicate, reorder, drop, retry, or route messages asynchronously.
primeMessage Passing— Autonomous holders of private state interact only through discrete addressed messages over intermediating channels.
Receiver-owned state transition · grounded
The receiver retains authority over how an incoming message changes its own state.
The receiving actor interprets and handles the message according to a contract, not by surrendering internal control to the sender. In this condition set, the requirement is: The receiver retains authority over how an incoming message changes its own state.
primeMessage Passing— Autonomous holders of private state interact only through discrete addressed messages over intermediating channels.
Auditable discrete interaction · grounded
The cross-boundary interaction must remain discrete, observable, replayable, and auditable.
Trace IDs, correlation IDs, receipt, handler outcome, and failure disposition matter when no shared memory explains what happened. In this condition set, the requirement is: The cross-boundary interaction must remain discrete, observable, replayable, and auditable.
primeMessage Passing— Autonomous holders of private state interact only through discrete addressed messages over intermediating channels.
Finite channel throughput · grounded
Correctness depends on respecting a finite channel's reliable throughput ceiling.
Backpressure, queue limits, retry policy, and drop behavior determine whether the system fails safely or amplifies failure. In this condition set, the requirement is: Correctness depends on respecting a finite channel's reliable throughput ceiling.
primeChannel Capacity— Any information-bearing medium has a hard upper bound on reliable throughput that effort cannot exceed.
Other requirements and context (1)
Why these sit outside the expression
Application gate — it governs whether applying the archetype is appropriate or material, rather than defining the structural problem itself.
Application gateAuthorization depends on message type, endpoint, sender, role, or context.
The channel must not become a privilege-escalation path around direct access control. In this archetype, the relevant application gate is: Authorization depends on message type, endpoint, sender, role, or context. It narrows when choosing or applying the archetype is warranted or decision-relevant.
Coverage
6 of 6 conditions grounded.
Integration notes¶
This draft is intentionally merge-sensitive. It should be indexed near queue-family archetypes, handoff/communication archetypes, and the later publish_subscribe target. The safest integration path is to accept this as the generic message-mediated coordination parent while preserving broker/topic fan-out, event sourcing, and actor-runtime details as variants or neighboring archetypes depending on later review.
Common Mechanisms¶
12 documented mechanisms across 3 implementation forms.
The grouping reflects forms represented among the mechanisms currently documented for this archetype; an absent form is not necessarily an impossible implementation.
Control, Automation & Runtime · 10 mechanisms
- Actor Mailbox Loop — Gives each actor private state and a personal mailbox it drains one message at a time, so cross-actor effects happen only through addressed messages and never through shared memory.
- Backpressure Signal — Lets an overwhelmed receiver tell its producers to slow down or pause, so load is regulated by explicit demand travelling upstream instead of by silently overrunning the consumer.
- Command Message Handler — Receives a directed, imperative command message, decides whether it may and should be honoured, and either applies it as a state change or rejects it with a reason.
- Dead-Letter Queue — A side queue that captures events a subscriber cannot process after its retries are exhausted, isolating poison messages and preserving them as evidence instead of losing or looping them.
- Durable Queue with Acknowledgement — Persists each message and keeps it until the consumer acknowledges success, redelivering on crash or timeout — so messages survive failure, at the cost of possible duplicates.
- Event Choreography — Coordinates many participants with no central conductor — each publishes events about what it just did and reacts to others', so the workflow emerges from the exchange itself.
- Message Schema Registry — A governed catalog of message shapes that every sender and receiver validates against, so contracts stay stable and evolve compatibly instead of breaking silently.
- Request-Reply Correlation — Turns one-way messaging into a two-way conversation by tagging each request so its eventual reply can be matched back to the caller — within a bounded waiting window.
- Retry with Idempotency Key — Makes at-least-once delivery safe by resending failed messages while stamping each with a stable key, so a duplicate that slips through is recognized and applied only once.
- Transactional Outbox/Inbox Relay — Closes the gap between saving state and sending a message by writing the outgoing message into the same database transaction as the state change, then relaying it — with the receiver deduping on an inbox.
Record, Log & Register · 1 mechanism
- Correlation Trace Header — A small set of IDs carried on every message — correlation, causation, and trace identifiers — that lets a scattered fan-out of messages be reassembled into one causal story after the fact.
Structure, Architecture & Configuration · 1 mechanism
- Bounded Mailbox or Queue — A message buffer with a hard cap on how many messages (and often how old a message) it will hold, so overload becomes an explicit, chosen overflow policy instead of unbounded memory growth.
Compression statement¶
Message-Mediated State Coordination is the pattern of turning coupled interaction into explicit message exchange. It draws a boundary around each participant’s private state, defines addressable endpoints or mailboxes, standardizes message contracts, routes messages through channels with declared delivery semantics, binds each accepted message to a handler and state-transition rule, controls ordering and concurrency, handles timeout/retry/failure without hidden shared memory, and leaves trace evidence sufficient to debug, audit, and repair the coordination.
Canonical formula: private_state_boundaries + addressed_messages + channel_delivery_semantics + handlers + failure_observability -> coordinated_state_change_without_shared_substrate
Related Abstractions¶
Abstractions this archetype builds on — directly (a source ingredient) or as a related pattern. Links follow the typed catalog namespace.
Built directly on (8)
- Boundary: Defines system limits.
- Coordination: Aligning independently controlled actors so their separate actions combine into a coherent collective outcome despite distributed decision-making and incomplete shared information.
- Coupling: Interdependence among subsystems.
- Indirection: Introduces intermediary references.
- Interface: A bounded, rule-governed surface across which two systems exchange information or control while hiding their internals, letting each evolve independently behind a stable contract.
- Message Passing: Autonomous holders of private state interact only through discrete addressed messages over intermediating channels.
- Queueing: Organizes tasks into a waiting line based on arrival and service rates.
- State and State Transition: Captures system condition and evolution.
Also references 17 related abstractions
- Access Control: Restrict system access.
- Accountability: Responsibility for actions.
- Backpressure: A return signal from a downstream stage throttles upstream production to its own capacity, converting a one-way push into a two-way conversation that holds the system at the bottleneck's throughput instead of accumulating hidden queue debt.
- Boundary State Loss: State crossing a carrier boundary through a bounded artifact is constitutively reduced, surfacing later as failure.
- Callback: A named action handed off in advance, to be invoked later by someone else when a specified condition arises, releasing the registrant from synchronous waiting.
- Channel Capacity: Any information-bearing medium has a hard upper bound on reliable throughput that effort cannot exceed.
- Communication Repair: When agents sharing state over an unreliable channel detect divergence, they pause the primary exchange, invoke a meta-channel act to restore alignment, and resume — making shared meaning robust to noise without perfect transmission.
- Consensus: Producing a single shared decided state from many participants with disagreeing or adversarial views, under a fault model, satisfying agreement, validity, and termination together.
- Deadlock: Mutual blocking processes.
- Hidden Information Reconstruction: An observer combines a system's disclosed outputs with a prior over possible inputs to reconstruct a protected input to whatever resolution the prior permits, so privacy is a property of the (system, adversary-prior) pair rather than of the disclosure surface alone.
Variants¶
Narrower or domain-specific specializations that share this archetype's core structure. Recognized variants are established; candidate variants are provisional.
Actor Mailbox Coordination · implementation variant · recognized
Each actor owns private state and processes incoming messages from a mailbox under local handler rules.
- Distinct from parent: This is a runtime and concurrency variant of the broader message-mediated pattern.
- Use when: Participants are naturally autonomous state holders; Serializing or controlling handler concurrency is central to correctness; The sender should not block on or inspect receiver internals.
- Typical domains: actor model systems, robotics agents, user interface event loops
- Common mechanisms: actor mailbox loop, bounded mailbox or queue
Request-Reply Message Exchange · communication variant · recognized
A sender issues a request message and later correlates a reply, rejection, timeout, or cancellation.
- Distinct from parent: It narrows message passing to a paired conversational contract.
- Use when: The sender needs an explicit answer or acknowledgement; Latency and timeout semantics matter; Duplicate replies or lost replies must be handled.
- Typical domains: service api design, case management, device command protocols
- Common mechanisms: request reply correlation, correlation trace header
Event Message Choreography · implementation variant · recognized
Participants publish messages describing local state changes and other participants react without direct orchestration.
- Distinct from parent: It narrows the parent to event semantics and choreography.
- Use when: Loose coupling is more important than centralized control; Participants can tolerate eventual consistency; Downstream consumers need facts rather than commands.
- Typical domains: event driven architecture, workflow automation, observability pipelines
- Common mechanisms: event choreography, message schema registry, transactional outbox inbox relay
Durable Queue Message Processing · implementation variant · candidate
Messages are persisted in a queue and processed with acknowledgement, retry, capacity, and dead-letter rules.
- Distinct from parent: It focuses on the channel storage and processing mechanics rather than all forms of message mediation.
- Use when: Senders and receivers operate at different speeds; Temporary receiver failure should not drop messages; Backlog, ordering, and retry must be governed.
- Typical domains: job processing, support ticket workflows, stream ingestion
- Common mechanisms: durable queue with acknowledgement, dead letter queue, bounded mailbox or queue
Near names: Message-Passing Interface Design, Mailbox Coordination, Asynchronous Message Coordination, Message Bus Design.
Editorial Notes¶
Problem Classification¶
Classification: Coordination, Dependency & Sequencing Failure → Cross-Boundary Handoff & Distributed Integration
Problem kernel: autonomous private states lack governed message coordination
Rationale: Earliest causal condition: Several autonomous actors, services, components, teams, devices, or institutions must influence one another while retaining private state and local control. Without a governed message substrate they either share state unsafely, depend on direct inspection, make hidden side effects, lose context at boundaries, block while waiting for synch
Independent corroboration: The earliest necessary condition in the frozen evidence is: Several autonomous actors, services, components, teams, devices, or institutions must influence one another while retaining private state and local control. That is a cross boundary handoff and distributed integration problem because Autonomous functions or participants cannot combine their contributions because coordination context, state, signals, or feasible exchange paths are lost across ownership boundaries.
Review outcome: Independent reviewer agreement; high confidence.