Sync FAQ
1. What is the relationship between synchronization sessions, devices and acknowledgement keys?
A synchronization session is an act of calling POST /v2/sync/start
, then draining the queue until there is no data, acknowledging processed data as you go.
A device is a client that wants to keep data in sync with Sell. The device has a UUID that must not change between synchronization sessions.
Acknowledgement keys are related to data you fetched and sent to POST /v2/sync/ack
, which states that the device has this object.
2. What happens if your server sends all of its data for page X in queue Q when in fact the connection is dropped?
It is assumed to be not acknowledged, and it will be resent when you start a new synchronization session by hitting /v2/sync/start
.
3. Number of stated objects in the response from the Start session endpoint?
The numbers aim to be close as possible to the actual state, but they can act as a guide to how much data you can expect. The reason for this is that our Sync service is optimized for getting data to the device as fast possible, and if some records are deleted, created etc. during the synchronization, there might be more instructions in the queues.
4. If an object was created and deleted before the synchronization ever started, will it show up at all in the sync?
No, it won't. If you completed at least a single synchronization flow and an object was created before another sync session, it is possible for a delete of a non-existent object to appear. This is caused by the Sync service optimizing itself for getting data to you as soon as possible. On our devices we handle this by removing by ids, and ignoring when we do not have objects that the device was told to remove.
5. Is it correct to interpret a "created" event type as meaning "this is the first time you've seen this object in this synchronization session" ?
Created means you never acknowledged it, so we consider it to be something which is new to you in general, not in this sync session.
6. How are acknowledgement keys processed?
Acknowledgement keys are processed in the background, so if you start a new sync before all keys are processed, the Sync service will assume that you don’t have the data and will try to send it to you again. That is why it is recommended that acknowledgement keys are sent frequently when processing the data.