You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At some point this year we will want to add CRDTs to the core db API, at the runtime/core level, or possibly at the ModelDB level:
Adding a CRDT type to the Models schema type
It should be possible to declare a model field with the yjs.document model type.
Adding CRDT support to the db API in runtime, e.g.
When this.#context is set up, reconstruct an in-memory representation of the CRDT
At the end of a runtime call, collect CRDT deltas and update the in-memory representation of the CRDT
Serialize and save the CRDT to ModelDB
Adding a db API for CRDTs. Change the types for db.set to accept reducers for CRDTs, or create a new CRDT update API, and making it so db.set and db.get don't interact with CRDTs, by filtering out the CRDT field, etc.
However, there are changes in progress on the runtime database APIs. Instead, before making any CRDT changes we can set up tests using a helper that emulates the syntax of a CRDT db API:
Using this model, we can set up a few single-threaded tests for different Y.js shared types. We can also plan out tests for concurrent updates to CRDTs (without implementing them); just mark each block of updates that needs to be split into being done by concurrent actors with a comment inside cr().update().
The text was updated successfully, but these errors were encountered:
At some point this year we will want to add CRDTs to the core
db
API, at the runtime/core level, or possibly at the ModelDB level:Models
schema typeyjs.document
model type.db
API in runtime, e.g.this.#context
is set up, reconstruct an in-memory representation of the CRDTdb.set
to accept reducers for CRDTs, or create a new CRDT update API, and making it sodb.set
anddb.get
don't interact with CRDTs, by filtering out the CRDT field, etc.However, there are changes in progress on the runtime database APIs. Instead, before making any CRDT changes we can set up tests using a helper that emulates the syntax of a CRDT
db
API:Using this model, we can set up a few single-threaded tests for different Y.js shared types. We can also plan out tests for concurrent updates to CRDTs (without implementing them); just mark each block of updates that needs to be split into being done by concurrent actors with a comment inside cr().update().
The text was updated successfully, but these errors were encountered: