Skip to main content

Shared Object Channel

A Shared Object Channel is a special type of channel designed for real-time collaborative state.
They expose a shared, mutable object that multiple clients can read and update concurrently while ART guarantees eventual consistency using CRDTs (Conflict-free Replicated Data Types).

This makes Shared Object Channels ideal for scenarios when the application requires multiple users to read & write the same structured data without central locks or manual conflict resolution.

Figure 8: Shared Object Channels

How CRDT Ensures Consistency

CRDT (Conflict-free Replicated Data Type) ensures all clients eventually converge to the same state, regardless of the order of updates. Updates taken from different clients are merged automatically according to the merge rules, without any data loss and offline clients can rejoin and sync seamlessly with the latest state.

Example: Imagine Bob and Martha are working on the same online document "Initial Project Proposal" at the same time. Bob renames the document to "Project Proposal". At the same moment, Martha renames it to "Final Draft". The shared document automatically merges both changes. Since Martha’s update arrives last, the document name becomes "Final Draft".

  • If Bob changes the title to "Project Proposal" while Martha changes it to "Final Draft", CRDT ensures both edits are merged without conflict.
  • Both Bob and Martha’s editors will eventually show the same final version, no matter the order of their changes.

Common Use Cases

Shared Object Channels are perfect for applications that require real-time collaboration and shared state management. Common use cases include:

  • Collaborative Document Editing: Multiple users can edit the same document simultaneously, with changes merging seamlessly.
  • Shared Task Lists: Teams can manage and update task lists in real time, with everyone seeing the latest updates.
  • Real-Time Dashboards: Display shared metrics or data that multiple users can update and view instantly.
  • Gaming State Synchronization: Keep game state consistent across multiple players in real time.
  • IoT Device Management: Synchronize settings and states across multiple devices in real time.