Data Layer medium complexity mobile
1
Dependencies
1
Dependents
6
Entities
0
Integrations

Description

Persistent queue that tracks all data mutations (creates, updates, deletes) made while offline, storing them with timestamps and retry counters. When connectivity is restored, the Background Sync service processes this queue in order, applying conflict resolution rules such as last-write-wins for most fields and server-authoritative for approval statuses.

Feature: Offline Data Support

sync-queue

Responsibilities

  • Enqueue all offline mutations with timestamps and operation types
  • Persist queue entries to survive app restarts and crashes
  • Track retry counts and failure reasons per queue entry
  • Provide ordered retrieval for sequential sync processing
  • Support conflict resolution metadata for server reconciliation

Interfaces

enqueue(operation)
dequeue()
peek()
getQueueSize()
getQueuedOperations()
markAsProcessed(operationId)
markAsFailed(operationId, reason)
incrementRetryCount(operationId)
getFailedOperations()
clearProcessedEntries()
getOperationsByEntity(entityType)
reorderQueue()

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component