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

Description

Implements the server-wins conflict resolution strategy for cases where a locally queued mutation conflicts with a server-side change detected during sync. Records all resolved conflicts in a local audit trail so users can review what was overwritten. Provides hooks for future policy extensions if server-wins proves insufficient for specific entity types.

Feature: Offline Support & Data Sync

conflict-resolution-service

Responsibilities

  • Detect conflicts between local mutations and server responses during sync
  • Apply server-wins resolution policy and discard superseded local changes
  • Write conflict resolution records to the local audit log
  • Expose resolved conflict events for UI notification

Interfaces

resolveConflict(local: PendingOperation, serverResponse: ApiResponse): ConflictResolution
getConflictHistory(): List<ConflictRecord>
clearConflictHistory()
isConflict(local: PendingOperation, serverResponse: ApiResponse): bool
buildAuditEntry(resolution: ConflictResolution): AuditRecord

Relationships

Dependencies (2)

Components this component depends on

Dependents (1)

Components that depend on this component

Related Data Entities (2)

Data entities managed by this component