An ID that uniquely identifies this replica among all connected replicas.
You often access this through Collab.runtime, e.g.,
this.runtime.replicaID
in a Collab subclass.
Internal (Collab.send) use only.
Sends the given message on behalf of child. In general, this parent is then responsible for delivering the given message to Collab.receive on each replica of child, with guarantees set by the runtime.
The caller.
As in Collab.send.
As in Collab.send.
Inverse of idOf.
Returns a CollabID for the given Collab.
The CollabID may be passed to fromID on any replica of this
runtime to obtain that replica's copy of collab
.
A Collab that belongs to this runtime.
Generated using TypeDoc
A runtime for a Collabs document, responsible for connecting replicas of Collabs across devices and for other whole-document functionality.
IRuntime is a general interface; specific replication techniques are expected to provide their own implementations, such as CRuntime for CRDTs.
A runtime creates and manages the tree of Collabs for a document, and it provides utilities for those Collabs (e.g., replicaID). Each Collab can access its runtime using Collab.runtime.
A runtime also delivers updates between replicas with runtime-specific guarantees. For example, CRuntime guarantees that messages are broadcast exactly-once in causal order with immediate delivery of local messages.