Files
archify-vscode-ext/examples/arc42-cinema-tickets/decisions/0001-seat-holds-with-ttl.archify-decision
T
root-at-skic d9777fb90e arc42 and ArchiMate examples: nine models, three per framework; 1.2
The six models from extension 0.11.0 (arc42 by section, ArchiMate by
layer) next to the three C4 ones; model:scaffold --example offers them
and the tests validate each with 0 problems.
2026-11-08 22:57:00 +02:00

21 lines
838 B
Plaintext

schema_version: 1
decision:
id: seat-holds-with-ttl
title: Seat holds as Redis keys with a TTL
status: accepted
date: 2026-09-08
elements: [booking, seatlock]
diagrams: [0500-building-blocks/booking.archify, 0600-runtime/book-seats.archify]
context: >
A customer may spend minutes at the payment page. Holding seats
as rows in the database left orphans when a browser closed, and
a nightly job freed them far too late for Friday shows.
decision: >
A hold is one Redis key per seat, set with SET NX and an
8-minute TTL. The payment webhook turns holds into an order in
PostgreSQL; an expired key frees the seat without any job.
consequences: >
Holds survive no Redis restart; at worst a customer re-picks
seats. The webhook must check the hold still exists before it
confirms the order, otherwise it refunds.