Closed gterzian closed 1 year ago
First pass:
Sink
of StorageMessage
, an enum with two variants:
get_changes_clock.unwrap().len()
)storage.poll_ready
. When it becomes ready, we determine whether to do a full or incremental save based on a call to the api at 3(could be further configured, or even determined dynamically through a callback), and then start_send
the appropriate message. The idea is that if the sink is busy, then changes will pile up and the next message is likely to be a SaveFullDoc, whereas if the sink is not busy we'll do lots of incremental changes.
cc @orionz @alexjg
Currently a user could already persist documents and re-load them using a combination of:
save
the document and persists the resulting blob.We will have to define a higher-level API, one that could internally use incremental saves, and make it available to clients via a trait.