ably / ably-asset-tracking-swift

iOS client SDKs for the Ably Asset Tracking service.
Apache License 2.0
9 stars 6 forks source link

Publisher Worker Queue: Update Resolution #566

Open AndyTWF opened 1 year ago

AndyTWF commented 1 year ago

Implement the following AAT Android worker:

UpdateResolution is responsible for updating the Publishers presence data when a new resolution is resolved (in publisher.resolveResolution).

If the resolution is not currently queued for update, it is added to a list of publisher resolutions to be updated. If the resolution is not the latest resolution to be added (for example, in practice, another has come along and the presence update failed), then it is removed and the operation terminates.

Otherwise, we wait for the ably channel to attach and update presence data to include the latest resolution. If this results in a fatal error or is successful, UpdateResolutionSuccess work is posted. Otherwise, the resolution update is retried.

The UpdateResolutionSuccess worker removes the resolution from the update queue.

This work depends on:

This work is implemented almost identically to the workers in the following task, so may benefit from taking what's already been done:

sync-by-unito[bot] commented 1 year ago

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3379