Communication Patterns
Communication Patterns
OpenMesh supports a multi-pattern communication model that allows agents to interact in ways suited to their task, environment, and trust context. Rather than forcing a single interaction style, OpenMesh provides a unified substrate where multiple patterns coexist and interoperate over the same communication fabric.
-
Publish–Subscribe (Pub/Sub)
-
Purpose:
- Decouple producers and consumers of information, enabling one-to-many and many-to-many distribution without prior coordination.
-
Mechanics in OpenMesh:
- Topic Model: Hierarchical URIs with wildcards and intent tags.
- QoS Levels: At-most-once, at-least-once, with optional ordering guarantees per topic partition.
- Topic Types:
- Pinned Topics: Log-backed for replay and historical catch-up.
- Ephemeral Topics: No persistence; optimized for transient events.
- Sealed Topics: Encrypted for restricted audiences.
- Routing: : Federated relays exchange subscription maps via gossip.
-
Example Use Cases:
- Market data streams
- Sensor telemetry
- Collective perception in MAS
-
Request–Reply
-
Purpose:
- Enable synchronous or semi-synchronous conversations for information retrieval, task delegation, or contract negotiation.
-
Mechanics in OpenMesh:
- Built on top of pub/sub with correlation IDs linking request and response.
- Timeouts and retry policies negotiated in session metadata.
- Responses may be single or multi-part.
- Optional (At application level) sealed replies for private exchanges within a public request channel.
-
Example Use Cases:
- Resource discovery (“Which node has dataset X?”)
- Capability queries (“Can you execute Protocol P@v2?”)
- Agreement signing and contract finalization
-
Streaming Channels
-
Purpose:
- Provide continuous, ordered, and flow-controlled delivery of data between agents.
-
Mechanics in OpenMesh:
- Session-oriented streams with backpressure tokens to prevent overload.
- Transport abstraction allows streaming over QUIC, WebRTC, or gRPC.
- Frames carry trace IDs for observability.
- Streams can be one-way (broadcast) or bi-directional (interactive).
-
Example Use Cases:
- Real-time video or audio feeds
- Continuous model inference results
- Distributed simulation updates
-
Inbox / Mailbox
-
Purpose:
- Provide per-agent message queues for direct, reliable delivery - critical for offline or intermittently connected agents.
-
Mechanics in OpenMesh:
- Addressed via
mbx://did#channel
identifiers. - Channels may be priority-scoped (system, control, interactive, bulk).
- Store-and-forward persistence at relays with visibility timeouts and dead-letter topics.
- End-to-end encryption with sender allowlists to prevent spam.
- Addressed via
-
Example Use Cases:
- Task assignments to mobile agents
- Private alerts or commands
- Store-and-forward coordination for agents behind NAT/firewalls
-
Gossip and Epidemic Dissemination
-
Purpose:
- Distribute small but important state updates in a fault-tolerant, partition-tolerant manner.
-
Mechanics in OpenMesh:
- Push–pull gossip with configurable fan-out for membership, topic discovery, and lightweight state sync.
- Adaptive frequency based on network stability and churn rates.
- Used for both control-plane (membership) and small data-plane payloads (e.g., rumors, votes).
-
Example Use Cases:
- Membership tables
- Reputation signals
- Rapid incident alerts
-
Shared State Boards
-
Purpose:
- Maintain collaborative, eventually consistent state across a group of agents.
-
Mechanics in OpenMesh:
- Backed by Conflict-free Replicated Data Types (CRDTs) for mergeable state without central coordination.
- Changes propagated via pub/sub or gossip.
- Boards can be public, circle-restricted, or sealed for privacy.
-
Example Use Cases:
- Shared maps in multi-robot exploration
- Distributed ledger-style ledgers for MAS economies
- Group decision state in governance protocols
-
Social-Graph–Aware Routing
-
Purpose:
- Overlay trust, role, and reputational context on top of message routing for selective attention and noise reduction.
-
Mechanics in OpenMesh:
- Agent Graph edges encode relations (trusts, endorses, delegates).
- Circles define communication scopes with shared policies.
- Routing prioritizes messages from trusted, relevant, or high-reputation sources.
- Supports attention boosting for urgent, contextually important topics.
-
Example Use Cases:
- Collaborative filtering of knowledge streams
- Prioritized delivery in crisis coordination
- Role-scoped governance communication
-
Pattern Interoperability
-
A single OpenMesh deployment can combine patterns in composite workflows:
- Negotiation can start as pub/sub (proposal broadcast) → switch to request-reply (counteroffers) → finalize via mailbox (signed contract).
- Swarm coordination can use gossip (status updates) → pub/sub (task assignments) → shared boards (state tracking).
-
Because patterns share the same semantic and policy layers, agents can mix and transition between them without breaking interoperability.