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.
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¶
- Actor Mailbox Loop
- Backpressure Signal
- Bounded Mailbox or Queue
- Command Message Handler
- Correlation Trace Header
- 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
- Event Choreography
- Message Schema Registry
- Request-Reply Correlation
- Retry with Idempotency Key
- Transactional Outbox/Inbox Relay
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.