~whynothugo/pimsync#180: 
Batched write operations

Storages may support updating multiple items in a single I/O operation (singlefile, JMAP).

The current storage API does not allow leveraging this.

We'd want something like (tentatively):

let batch = storage.start_batch();
batch.create_item(…);
batch.create_item(…);
batch.update_item(…);
batch.execute().await?;

Note that execution does not need to be atomic (some storages will simply perform N network round trips).

It is not entirely clear how we'd return the result of each operation. Maybe we need to model operations as self-contained types, so that the return value is a map of where keys are the original operation and values are the result?

Status
REPORTED
Submitter
~whynothugo
Assigned to
No-one
Submitted
a month ago
Updated
a month ago
Labels
0:enchancement 3:vstorage 5:optimisation