Context
Phase 1.11.6-1.11.8 — Buyer Remote Presentation flow: Sales Agent в админке нажимает «Remote Presentation» → генерируется ephemeral link (1h default) → buyer открывает на своём девайсе → всё что SA делает на экране (view changes, unit selection, filters) реплицируется у buyer real-time.
Narrow scope per CONV-31 L3: этот ADR покрывает только use-case A (Buyer Remote Presentation). Use-case B (unit status sync между Sales Agents) — defers to Phase 1.10 implementation как simple polling, без отдельного ADR.
Phase 1.11.6-8 риски Stage-2 deferral (если timeline tight) — поэтому investment в общую Real-time Platform не оправдан сейчас. Status field shell-pending-tech-estimate reflects: ADR reserves number + scope + alternatives для discussion с Илья + командой, но финальный architecture pick откладывается до tech estimate.
Open Questions
- Architecture choice — Polling / SSE / WebSocket / Managed (Pusher / Ably / Supabase Realtime / etc).
- Stage 1 vs Stage 2 timing — если Илья tech estimate показывает > 3 weeks build, переезжаем в Stage 2.
- Mobile-first viewer rendering — Phase 1.11.8 требует optimised UI для buyer phone screen (large touch targets, simplified UI, no edit controls).
- Session expiry / abandonment handling — SA закрыл tab → buyer's view freezes? auto-end session? notification?
Architectures Considered
| Variant | Build | Ops cost | Latency | Notes |
|---|---|---|---|---|
| A. Polling (REST endpoint, buyer пингует server каждые 2-5s) | 🟢 simplest (regular HTTP) | 🟡 traffic-heavy | 🔴 2-5s | Не feels «real-time» для presentation use-case |
| B. SSE (Server-Sent Events, server-only push) | 🟢 simple (one-way push) | 🟢 cheap | 🟡 sub-second | Sufficient если bi-directional не нужен |
| C. WebSocket (self-hosted gateway) | 🟡 complex (reconnect handling, scaling) | 🟡 stack-dependent | 🟢 < 200ms | Bi-directional, full control |
| D. Managed (Pusher / Ably / Supabase Realtime) | 🟢 fastest ship | 🔴 ~$50-200/mo | 🟢 < 200ms | Vendor-dependent, but minimal ops |
Decision Criteria
- Latency budget — < 500ms feels «real-time», > 1s feels laggy. Polling at 2-5s не qualifies.
- Ops cost — managed services exchange capex (build) for opex (subscription). Self-hosted reverse.
- Scale (concurrent presentations) — Stage 1 expected ~10-50 concurrent; не требует heavy infrastructure.
- Build vs buy — Илья estimate определит actual hours для self-hosted WebSocket vs managed integration.
Resolves at
Pending Илья tech estimate (Илья provides hours estimate per architecture variant) + sub-plan plans/buyer-profile-and-presentation.md ratification (sub-plan owns 1.11.1-8 detail spec). Architectures table — discussion artefact для Илья + команды.
If Phase 1.11.6-8 deferred to Stage 2 → ADR 0012 marked superseded-by (Stage 2 ADR) and re-opened когда Phase resumes.
Cross-references: ADR 0009 (Buyer entity + tokenised URL routing) · Phase 1.11.6-8 (implementation home).