ACID properties of sync? Conflict between open modals and sync?

Hi Andrei.

When using the Everdo sync server subscription, what kind of ACID properties hold for client-server syncs?

In the face of:

  • network failure during sync
  • client failure during sync
  • server failure during sync
  • clients hammering the sync server concurrently

… what kinds of ACID properties are there?

  • Is an entire sync a transaction?
  • Or is each individual item change transactional during a sync?
  • Or are there no transactional guarantees at all?

Also, how do sync and modals interact?

  • Does client sync run behind an open modal or is it deferred?
  • If sync can occur in the background, what happens when the client pulls a modified item from the server behind the back of an open editing modal for that same item?
  • If the user opens a modal in the middle of a sync happening, does the sync abort?

Sync is a single transaction. Either all pending items get synced or none.

On desktop sync runs in the background when any modal/editor is open. The editor doesn’t get updated with incoming changes from sync. If there is a conflict when you submit a modal, it will overwrite whatever happened during sync.

No, it doesn’t abort.
A conflict can only arise at a property level, for example item.title. If this happens, the latest wall clock wins.
Because conflicts are resolved at a property level and you don’t generally edit the same property of the same item concurrently on multiple devices, you don’t usually have to worry about these things.

So concurrent attempts to sync with the server will result in only one client succeeding? The others will fail and can retry later after some backoff period?

The server serializes all updates for the same account. Every client will succeed.