내외부 시퀀스 - 불필요 이벤트 제거

This commit is contained in:
cyjadela
2025-10-23 10:03:35 +09:00
parent 5d7e0c42f0
commit 6e2baa2386
10 changed files with 110 additions and 97 deletions
@@ -45,10 +45,14 @@ note right
end note
== 이벤트 발행 ==
Meeting -> Notification: TodoCompleted 이벤트 발행\n(todoId, meetingId, completedBy,\ncompletedAt, meetingCreatorId)
Meeting -> Notification: NotificationRequest 이벤트 발행
activate Notification
note right
Azure Event Hubs를 통한
비동기 이벤트 발행
이벤트 데이터:
- 발송수단: EMAIL
- 대상자: 회의록 작성자
- 메시지: Todo 완료 안내
- 메타데이터: todoId, 완료자, 완료 시간
end note
Meeting --> Gateway: 200 OK\n{todoId, status: COMPLETED,\ncompletedAt, completedBy}
@@ -59,8 +63,7 @@ Web --> User: Todo 완료 표시
deactivate Web
== 알림 발송 ==
activate Notification
Notification -> Notification: TodoCompleted 이벤트 구독
Notification -> Notification: NotificationRequest 이벤트 구독
Notification -> Notification: 알림 메시지 생성\n- 수신자: 회의록 작성자\n- 내용: "Todo 완료됨"
Notification --> Notification: 이메일 발송\n(회의록 작성자에게)
note right
@@ -42,8 +42,15 @@ Redis --> Meeting: 캐시 삭제 완료
deactivate Redis
== 이벤트 발행 ==
Meeting -> EventHub: MinutesShared 이벤트 발행\n(minutesId, 참석자 목록, 공유 URL)
Meeting -> EventHub: NotificationRequest 이벤트 발행\n(회의록 공유 알림)
activate EventHub
note right
이벤트 데이터:
- 발송수단: EMAIL
- 대상자: 참석자 전원
- 메시지: 회의록 공유 안내
- 메타데이터: 공유 URL, 권한 정보
end note
EventHub --> Meeting: 이벤트 발행 성공
deactivate EventHub
@@ -55,7 +62,7 @@ Web --> User: 공유 링크 표시
deactivate Web
== 알림 발송 ==
EventHub -> Notification: MinutesShared 이벤트 구독
EventHub -> Notification: NotificationRequest 이벤트 구독
activate Notification
Notification -> Notification: 이메일 템플릿 생성\n(회의 제목, 공유 URL, 권한 정보)
Notification -> Notification: 참석자 전원에게\n이메일 발송
@@ -35,8 +35,17 @@ activate Meeting
Meeting -> Meeting: 회의 세션 생성
Meeting -> EventHub: MeetingStarted 이벤트 발행
activate EventHub
Meeting -> STT: POST /stt/recording/start\n(meetingId, participantIds)
activate STT
note right
동기 호출로 즉시 녹음 시작
회의 시작과 음성 녹음이 원자적으로 처리
end note
STT -> STT: 음성 녹음 준비 및 시작
STT --> Meeting: 200 OK (recordingId)
deactivate STT
Meeting --> Gateway: 201 Created
deactivate Meeting
@@ -49,16 +58,7 @@ Frontend -> Frontend: 회의 화면으로 전환
Frontend --> User: 회의 진행 화면 표시
deactivate Frontend
== 음성 녹음 시작 ==
EventHub -> STT: MeetingStarted 이벤트 구독
activate STT
STT -> STT: 음성 녹음 준비
STT --> EventHub: 녹음 준비 완료
deactivate STT
deactivate EventHub
== 음성 녹음 진행 ==
== 실시간 회의록 작성 (반복) ==
@@ -48,8 +48,15 @@ activate Redis
Redis --> Meeting: 캐싱 완료
deactivate Redis
Meeting -> EventHub: MeetingCreated 이벤트 발행\n(meetingId, 제목, 일시, 참석자 목록)
Meeting -> EventHub: NotificationRequest 이벤트 발행
activate EventHub
note right
이벤트 데이터:
- 발송수단: EMAIL
- 대상자: 참석자 목록
- 메시지: 회의 초대 내용
- 메타데이터: 회의 제목, 일시, 장소
end note
EventHub --> Meeting: 발행 완료
deactivate EventHub
@@ -63,7 +70,7 @@ WebApp --> User: 회의 예약 완료 표시\n캘린더에 자동 등록
deactivate WebApp
== 참석자 초대 알림 (비동기) ==
EventHub -> Notification: MeetingCreated 이벤트 수신\n(Consumer Group: notification-service-group)
EventHub -> Notification: NotificationRequest 이벤트 수신\n(Consumer Group: notification-service-group)
Notification -> Email: 참석자 전원에게 초대 이메일 발송\n(회의 제목, 일시, 장소, 참여 링크)
Email --> Notification: 발송 완료
@@ -41,10 +41,20 @@ note right
Partition Key: {meetingId}
Consumer Group:
- stt-service-group
- ai-service-group
- notification-service-group
end note
Meeting -> EventHub: NotificationRequest 이벤트 발행\n(회의 종료 알림)
activate EventHub
note right
이벤트 데이터:
- 발송수단: EMAIL
- 대상자: 참석자 전원
- 메시지: 회의 종료 안내
- 메타데이터: 회의 통계, 회의록 링크
end note
EventHub --> Meeting: 발행 완료
deactivate EventHub
Meeting -> Gateway: 202 Accepted\n(회의 종료 완료)
Gateway -> WebApp: 회의 종료 완료 응답
WebApp -> User: 회의 통계 표시\n(총 시간, 참석자, 발언 횟수 등)
@@ -54,40 +64,9 @@ EventHub --> STT: MeetingEnded 이벤트 수신
STT -> STT: 음성 녹음 중지
STT -> STT: 최종 STT 변환 완료 확인
== 비동기 처리 - AI Todo 추출 ==
EventHub --> AI: MeetingEnded 이벤트 수신
AI -> AI: 최종 회의록 분석
AI -> AI: Todo 자동 추출\n- 액션 아이템 식별\n- 담당자 자동 식별\n- 마감일 추출
AI -> AI: DB 저장 (AiTaskStatus)
AI -> Meeting: POST /meetings/{meetingId}/todos\n(Todo 정보 전송)
note right
Todo 정보:
- Todo 내용
- 담당자 (자동 식별)
- 마감일 (언급된 경우)
- 우선순위
- 관련 회의록 섹션 링크
end note
Meeting -> Meeting: Todo 생성 및 할당\n(내부 처리)
Meeting -> Meeting: 회의록 섹션 링크 연결
Meeting -> Meeting: DB 저장 (Todo 테이블)
Meeting -> Meeting: Redis 캐시 무효화\n(todo:user:{userId})
Meeting -> EventHub: TodoCreated 이벤트 발행\n(todoId, assignee, dueDate)
note right
Partition Key: {userId}
Consumer Group:
- notification-service-group
end note
Meeting -> AI: 200 OK (Todo 생성 완료)
== 비동기 처리 - 회의 종료 알림 ==
EventHub --> Notification: MeetingEnded 이벤트 수신
Notification -> Notification: 회의 종료 알림 준비\n(참석자 전원)
Notification -> Notification: 이메일 발송
EventHub --> Notification: NotificationRequest 이벤트 수신
Notification -> Notification: 회의 종료 알림 발송\n(참석자 전원)
note right
알림 내용:
- 회의 제목
@@ -96,18 +75,6 @@ note right
- 회의록 링크
end note
== 비동기 처리 - Todo 할당 알림 ==
EventHub --> Notification: TodoCreated 이벤트 수신
Notification -> Notification: Todo 할당 알림 준비
Notification -> Notification: 담당자에게 이메일 발송
note right
알림 내용:
- Todo 내용
- 마감일
- 우선순위
- 회의록 링크 (해당 섹션)
end note
== 최종 회의록 확정 ==
User -> WebApp: 최종 회의록 확정 버튼 클릭
WebApp -> Gateway: POST /api/minutes/{minutesId}/finalize
@@ -128,18 +95,23 @@ else 필수 항목 작성 완료
Meeting -> Meeting: DB 저장 (MinutesVersion)
Meeting -> Meeting: Redis 캐시 무효화
Meeting -> EventHub: MinutesFinalized 이벤트 발행\n(meetingId, version, finalizedAt)
Meeting -> EventHub: NotificationRequest 이벤트 발행\n(회의록 확정 알림)
activate EventHub
note right
Partition Key: {meetingId}
Consumer Group:
- notification-service-group
이벤트 데이터:
- 발송수단: EMAIL
- 대상자: 참석자 전원
- 메시지: 회의록 확정 안내
- 메타데이터: 버전 번호, 확정 시간
end note
EventHub --> Meeting: 발행 완료
deactivate EventHub
Meeting -> Gateway: 200 OK\n(확정 버전 정보)
Gateway -> WebApp: 회의록 확정 완료
WebApp -> User: 확정 완료 안내\n(버전 번호, 확정 시간)
EventHub --> Notification: MinutesFinalized 이벤트 수신
EventHub --> Notification: NotificationRequest 이벤트 수신
Notification -> Notification: 회의록 확정 알림 발송\n(참석자 전원)
end