Offline & Resilience
En bref
Offline-first resilience layer designed for outdoor venues, rural areas and international competitions with unreliable connectivity: tournament management, license verification, score entry and event check-in keep working without network, with conflict-aware delta sync, configurable offline windows with grace periods, selective per-competition scoping and bandwidth-adaptive batched replay when connectivity returns.
Comment ça fonctionne
Resilience is built around a local datastore (WatermelonDB on mobile, IndexedDB on web) that holds the working set the device actually needs — current competition draws, score entry, cached license bundles for verification, and the participant roster for QR check-in. Every write goes to the local store first and is journalled into a per-table change log keyed on a delta timestamp; the user sees a sync-status indicator showing pending, completed, failed and conflict counts in real time.
When the radio comes back, a WatermelonDB-compatible pull/push protocol exchanges deltas with the API. Pushes are idempotent and version-tagged so a flaky uplink can retry safely; pulls stream only what changed since the last successful checkpoint. Conflicts are resolved by per-resource-type policies (last-write-wins, server-wins, client-wins or manual queue) with field-level auto/manual classification, and every resolution is recorded in a ConflictAuditEntry so a club admin can inspect after the fact why a score line moved.
License bundles are signed with HMAC-SHA256 so an offline scan can verify legitimacy even days into a no-signal weekend; incremental delta downloads use a previous_hash chain to keep payloads small. The platform enforces a configurable maximum offline window (default seven days, twelve-hour grace, five-day warning), invalidating expired offline data so a long-disconnected device cannot stamp records with stale identities. Selective sync lets a referee scope storage to one specific competition, and a connection-aware profile (wifi / 5G / 4G / 3G / 2G / ethernet) tunes batch size, image inclusion, compression and throttling. Background sync respects per-user wifi-only preferences and quiet hours; for the worst case there is a documented manual fallback — paper score sheets that can be photographed and OCR-ingested later.
Capacités clés
- Offline tournament draw, score entry and standings with replay on reconnect
- Cached license verification with HMAC-SHA256 integrity and incremental delta downloads
- WatermelonDB-style pull/push sync with idempotent writes and per-table change tracking
- Conflict resolution with configurable LWW / server-wins / client-wins / manual policies and full audit trail
- Configurable offline window with grace period and automatic expiry of stale data
- Selective sync scoping per competition plus bandwidth-aware adaptive batching
- Sync-status UI with per-type progress, pending/failed/conflict counts and graceful-degradation hints
En pratique
A national-level referee drives to a rural boulodrome with no cellular coverage. Before leaving Wi-Fi range she scopes selective sync to the weekend's tournament and the federation's full license roster. On site she runs the entire competition from her tablet: check-in by QR against the cached roster, draw generation, score entry round after round.
The status indicator shows a pending queue building. After the final, she walks back to the parking lot, picks up 4G, and the app pushes 312 score updates and 47 match results in a single replay — three timestamp collisions resolve automatically by last-write-wins, one disputed score lands in the manual conflict queue and she clears it on the spot.
Fonctionnalités de ce sous-système
8| ID | Status | Fonctionnalités |
|---|---|---|
| F16.01.01 | Livré | Offline tournament management (draw, score entry, standings — sync when online) ✅ PL-F1601a |
| F16.01.02 | Livré | Offline license verification (cached license data on device) ✅ PL-F1601a |
| F16.01.03 | Livré | Conflict-free data sync (CRDT or last-write-wins with conflict UI) ✅ PL-F1601a |
| F16.01.04 | Livré | Offline check-in at events (QR code scan against cached participant list) ✅ PL-F1601a |
| F16.01.05 | Livré | Background sync with retry and queue management ✅ PL-F1601b |
| F16.01.06 | Livré | Sync status indicator (what's pending, what's synced) ✅ PL-F1601b |
| F16.01.07 | Livré | Graceful degradation (features that work offline vs. require connectivity) ✅ PL-F1601b |
| F16.01.08 | Livré | Manual fallback procedures (paper score sheets that can be digitized later) ✅ PL-F1601b |
Sous-systèmes liés
Parties prenantes qui ont besoin de ce sous-système
Apparaît dans 3 analyses de parties prenantes