같은 IdempotencyKey는 하나의 OrderId로 모이고, 재개는 stream을 replay한 뒤 다음 단계부터 이어간다
Guided views
Explore this system
Step through curated paths without changing the source diagram.
Beat
Next
ReadyChapter 01 / 01
Guided chapter
Diagram guideExplore this system
Inspecting compiled semantics
E ExportT ThemeS Style0 Reset+ Zoom in- Zoom outEsc Close
Find a node
⌕/
No matching nodes
Semantic passport
Verified source
Authored reach
Route probeChoose a start node
Pick two semantic nodes on the diagram
Choose the source, then the destination. Direction matters.
Semantic lensCompare system roles
Choose up to two semantic kinds. One reveals its real traffic; two compare only direct authored relationships.
Choose a kind to inspect its nodes and touching relationships.
Semantic radar
Building overview
Click nodeDrag to pan
Semantic radar needs more MAP space.
mermaid par 블록 (archify에는 동시성 표현이 없어 평평하게 폈다)
• 1~4번([par] 표시)은 순차가 아니라 동시에 실행된다 — Client A/B가 같은 IdempotencyKey로 동시에 시작을 요청하고, 각 CommerceApi가 동시에 mapping을 예약한다.
Recovery replays the stream before choosing the next step
• mermaid Note over Workflow,Events(12번 Replay OrderId stream 앞에 위치): 'Recovery replays the stream before choosing the next step.'
• 동시 시작에서는 CommerceStateStore의 mapping reservation에서 먼저 성공한 요청이 OrderId를 결정한다. 다른 요청은 자신의 후보 ID를 버리고 같은 ID를 사용한다. SourceCommandId가 이미 stream에 있으면 Workflow는 event를 다시 기록하지 않고 fold 결과를 반환한다.
• 재개는 새 workflow 코드를 만들지 않는다 — stream을 replay해 마지막으로 기록된 상태(InventoryReserved)를 확인하고, 이미 완료한 예약 단계를 건너뛰어 결제부터 실행한다.