Skip to content

Commit 643e941

Browse files
committed
docs: Update README.md
1 parent ec1dbaa commit 643e941

1 file changed

Lines changed: 30 additions & 2 deletions

File tree

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ linktrip-bootstrap ← Spring Boot 진입점, DI 조립
6464
└─────────────────────────────┬───────────────────────────────┘
6565
6666
┌────────────────┼────────────────┐
67-
67+
6868
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
6969
│ output-cache │ │ output- │ │ output-http │
7070
│ (Caffeine) │ │ persistence │ │ (YouTube, │
@@ -133,14 +133,42 @@ POST /video/analyze { youtubeUrl }
133133
│ 일정 저장 (EAT / ATTRACTION / SHOPPING / etc.) │
134134
│ │ │
135135
│ 대기열 조회 → 각 요청자별 TripPlan 생성 │
136-
│ │ │
136+
│ │
137137
│ Google Places API 좌표 매핑 (병렬) │
138138
│ │ │
139139
│ 완료 알림 발송 │
140140
└────────────────────────────────────────────────┘
141141
142142
143143
GET /video/{id}/schedule → 일정표 + 장소 좌표 반환
144+
145+
```
146+
147+
### 동시 요청 처리
148+
149+
```
150+
같은 영상을 여러 사용자가 요청하는 경우:
151+
분석은 1회만 수행하고, 각 요청자의 여행 계획은 개별 생성
152+
153+
User A: POST /analyze (영상 X) → 새 분석 시작, 대기열 등록, Event 발행
154+
User B: POST /analyze (영상 X) → PENDING 확인 → 대기열 등록 (Event 발행 안 함)
155+
...분석 완료...
156+
EventListener → 대기열 조회 → [User A, User B] → TripPlan 각각 생성
157+
```
158+
159+
```
160+
분석 완료 후 요청하는 경우:
161+
162+
User C: POST /analyze (영상 X) → COMPLETED 확인 → TripPlan 즉시 생성 (대기열 불필요)
163+
```
164+
165+
```
166+
경쟁 조건 보완:
167+
168+
분석 완료 커밋과 대기열 조회 사이에 등록된 요청이 누락될 수 있음
169+
→ GET /schedule 조회 시 TripPlan이 없으면 즉시 생성 (Lazy 보완)
170+
→ EXISTS 쿼리는 (member_id, video_analysis_task_id) 커버링 인덱스로 처리
171+
144172
```
145173

146174
### 상태 전이

0 commit comments

Comments
 (0)