Service Layer medium complexity mobile
1
Dependencies
1
Dependents
1
Entities
0
Integrations

Description

Implements truncated exponential backoff with jitter (delay = min(base * 2^attempt + jitter, max_delay), base=30s, max_delay=3600s, jitter ±20%) for failed outbox mutations. Tracks per-item failure counts and transitions items to dead-letter state after a configurable threshold (default 10 retries), then dispatches a local notification.

Feature: Background Sync

retry-backoff-service

Responsibilities

  • Compute next retry delay using truncated exponential backoff with uniform random jitter
  • Persist per-mutation attempt count within the outbox record
  • Mark items as dead-letter after configurable maximum retry threshold
  • Trigger local push notification when a mutation enters dead-letter state
  • Expose retry schedule inspection for diagnostics panel

Interfaces

computeDelay(attemptCount: int) -> Duration
recordFailure(mutationId: String) -> RetryDecision
markDeadLetter(mutationId: String) -> Future<void>
getRetryStatus(mutationId: String) -> RetryStatus

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component