Workflow de réservation et frontière partenaire
Contexte
Used when product-critical flows depend on partner APIs that are slower or less reliable than the user-facing booking experience. It solves the problem of keeping frontend progress and backend truth aligned even when external systems respond late or inconsistently.
Idée clé
Treat booking state as the source of truth, and push partner variability behind explicit async recovery boundaries.
Tradeoff
This makes the backend stricter in ways product teams feel. Booking can no longer be treated as one clean success state, and this is where teams get stuck: API validation, queue retries, partner callbacks, and recovery tooling can all disagree for a while.
Réalité de production
In production, a partner API times out but still creates the reservation on its side. The retry creates a second reservation, then the original callback arrives late and overwrites the local status again. The user saw one spinner and one success screen, support sees conflicting states across screens, and engineers check logs that do not line up cleanly with partner timestamps. Without a clear local source of truth, teams end up guessing whether to retry, compensate, or tell the user to wait.
Signal de production
This pattern is common in marketplace and integration-heavy systems where conversion depends on not exposing partner instability directly to the user journey.
flowchart LR
A[User Booking Flow] --> B[Frontend Client]
B --> C[Booking API]
C --> D[Validation & Pricing Rules]
D --> E[(Booking Data)]
C -. retry jobs .-> F[Background Workers]
F --> G[Partner API Connectors]
G --> H[Partner Systems]
F --> I[Status Sync & Recovery]Légende
Flèches pleines : parcours principal
Flèches pointillées : sync partenaire et retries
Nœuds arrondis : étapes côté utilisateur
API de réservation
Définit des contrats fiables entre l’UI produit, les règles backend et les partenaires.
Workers de fond
Gèrent la synchronisation partenaire hors cycle de requête pour plus de résilience.
Synchronisation d’état
Permet de garder des parcours de reprise lisibles lorsque les partenaires sont instables.