A callback function that will result in some model data that will become the model's initial contents.
Either some data or a callback returning data can be provided.
Indicates what triggered the change to the download status. A value of "download" indicates that the change was triggered by a model being downloaded. A value of "subscription_change" indicates the event was triggered by a change to the subscription.
A Path
is essentially a set of instructions for retrieving a particular piece of data
(subtree) within a model's contents (JSON tree). e.g.
for a model with contents
{
"firstName": "James",
"kidsAges": [4, 7, 9]
}
one could query:
realTimeModel.elementAt(['firstName']) // RealTimeString, value() => "James"
realTimeModel.elementAt(['kidsAges', 1]) // RealTimeNumber, value() => 7
See the developer guide for more examples of using paths to get parts of a model's contents.
A PathElement is a particular desired node within a RealTimeModel's contents, which can be thought of as a JSON tree.
These have no meaning outside of a Path.
A unified type representing any type of reference.
When considering implementing real-time collaboration, most developers think (and only think!) about the various algorithms for synchronizing data. This indeed is a core consideration for collaborative editing systems, and many tomes have been written about it. Convergence's main goal is to insulate developers from the difficulties of implementing Operational Transformation. It does this by supporting a strict set of data: JSON.
See our developer guide for additional information.
To get started with Real Time Data, get an instance of the ModelService from the ConvergenceDomain.