[meta] Sync prototyping #176
Labels
No labels
A-build
A-cli
A-core
A-design
A-edn
A-ffi
A-query
A-sdk
A-sdk-android
A-sdk-ios
A-sync
A-transact
A-views
A-vocab
P-Android
P-desktop
P-iOS
bug
correctness
dependencies
dev-ergonomics
discussion
documentation
duplicate
enhancement
enquiry
good first bug
good first issue
help wanted
hygiene
in progress
invalid
question
ready
size
speed
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: greg/mentat#176
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We've identified a number of small changes and additions to Mentat in order for it to support sync prototyping. These are:
ref
anduuid
. Naturally some work is needed to allow transactions in thee
position. This is a departure from Datomic compatibility. We'll need a transaction sequence number, too, to provide ordering of transactions.tx
and sequence. This is how we'll copy remote transactions into the local store.:foo/id
, a local (renumbered) datom[1234 :foo/id "bar"]
, and a remote datom[1212 :foo/id "bar"]
, we want to replace1234
with1212
throughout a specified range of transactions.1234
and1212
will typically have been allocated since the last sync. This is similar to upserting except we want to take the remote entid, and we'll have less work to do because we already have a fully formed graph.With these primitives we'll be able to prototype some kinds of syncing: straightforward replication, rebases, and lossy merges.
There are additional things we might need as we continue to prototype, depending on how we implement syncing:
but we'll get to those when we come to them.