논리 아키텍처 이벤트 구독 및 발행 최적화

- AI Service 이벤트 구독 제거
  - MeetingCreated, MeetingEnded 구독 제거
  - TranscriptReady만 구독하도록 단순화

- Notification Service 이벤트 구독 변경
  - 기존 모든 이벤트 제거 (MeetingCreated, MeetingEnded, TranscriptCreated, TodoCreated, TodoCompleted, TranscriptShared)
  - NotificationRequest 이벤트만 구독하도록 통합

- Meeting Service 이벤트 발행 단순화
  - 발행 이벤트: MeetingEnded, NotificationRequest만 유지
  - NotificationRequest에 발송수단, 대상자, 메시지 정보 포함

- 이벤트 발행/구독 매트릭스 업데이트
  - 8개 이벤트 → 4개 이벤트로 단순화
  - 주요 사용자 플로우 업데이트 (회의 예약, 종료, Todo 관리, 회의록 공유)

- Mermaid 다이어그램 이벤트 구독 매핑 수정

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
kimjh 2025-10-22 16:33:35 +09:00
parent 3cf8eb2995
commit 6faeaa0d61
2 changed files with 51 additions and 52 deletions

View File

@ -111,13 +111,8 @@
- TodoProgress 엔티티: 진행 상황 (시작 시간, 완료 시간) - TodoProgress 엔티티: 진행 상황 (시작 시간, 완료 시간)
**이벤트 발행**: **이벤트 발행**:
- `MeetingCreated`: 회의 생성 시
- `MeetingStarted`: 회의 시작 시
- `MeetingEnded`: 회의 종료 시 - `MeetingEnded`: 회의 종료 시
- `TranscriptCreated`: 회의록 생성 완료 시 - `NotificationRequest`: 통지 요청 시 (발송수단, 대상자, 메시지 등 포함)
- `TranscriptShared`: 회의록 공유 시
- `TodoCreated`: Todo 생성 시
- `TodoCompleted`: Todo 완료 시
**실시간 동기화**: **실시간 동기화**:
- WebSocket을 통해 수정 델타 전송 (전체 데이터 대신) - WebSocket을 통해 수정 델타 전송 (전체 데이터 대신)
@ -215,14 +210,17 @@
- NotificationTemplate 엔티티: 알림 템플릿 - NotificationTemplate 엔티티: 알림 템플릿
**비동기 처리**: **비동기 처리**:
- Queue를 통한 알림 발송 요청 수신 - Event Hub를 통한 통지 요청 수신
- 대량 알림 발송 시 부하 분산 - 대량 알림 발송 시 부하 분산
**알림 유형**: **알림 처리**:
- 회의 생성/시작/종료 알림 - Meeting Service가 발행한 `NotificationRequest` 이벤트 구독
- Todo 할당/완료 알림 - 이벤트에 포함된 정보:
- 회의록 생성/공유 알림 - 발송수단 (이메일, SMS 등)
- 리마인더 (회의 30분 전, Todo 마감 3일 전) - 대상자 목록
- 메시지 내용 및 템플릿
- 발송 우선순위
- 알림 템플릿 기반 메시지 생성 및 발송
--- ---
@ -245,14 +243,10 @@
| 이벤트 | 발행자 | 구독자 | 목적 | | 이벤트 | 발행자 | 구독자 | 목적 |
|--------|--------|--------|------| |--------|--------|--------|------|
| **MeetingCreated** | Meeting Service | Notification Service<br/>AI Service | 참석자 알림 발송<br/>회의 분석 준비 | | **MeetingEnded** | Meeting Service | STT Service | 음성 녹음 종료 |
| **MeetingStarted** | Meeting Service | STT Service | 음성 녹음 시작 준비 |
| **MeetingEnded** | Meeting Service | STT Service<br/>AI Service<br/>Notification Service | 음성 녹음 종료<br/>AI 분석 종료<br/>종료 알림 |
| **TranscriptReady** | STT Service | AI Service | AI 회의록 분석 (5초 배치) | | **TranscriptReady** | STT Service | AI Service | AI 회의록 분석 (5초 배치) |
| **TranscriptSummaryCreated** | AI Service | Meeting Service | 회의록 최종 저장 및 동기화 | | **TranscriptSummaryCreated** | AI Service | Meeting Service | 회의록 최종 저장 및 동기화 |
| **TodoCreated** | Meeting Service | Notification Service | 담당자 알림 발송 | | **NotificationRequest** | Meeting Service | Notification Service | 통지 발송 (발송수단, 대상자, 메시지 포함) |
| **TodoCompleted** | Meeting Service | Notification Service | 완료 알림 |
| **TranscriptShared** | Meeting Service | Notification Service | 회의록 공유 알림 |
**Azure Event Hubs 구성**: **Azure Event Hubs 구성**:
- **Event Hub 네이밍**: `meeting-events`, `transcript-events`, `todo-events` - **Event Hub 네이밍**: `meeting-events`, `transcript-events`, `todo-events`
@ -325,21 +319,18 @@
회의 생성 (DB 저장) 회의 생성 (DB 저장)
MeetingCreated 이벤트 발행 NotificationRequest 이벤트 발행
┌───────────────────┴───────────────────┐ [Notification Service]
↓ ↓ 참석자 초대 알림 발송
[Notification Service] [AI Service]
참석자 초대 알림 발송 회의 분석 준비
``` ```
**단계별 처리**: **단계별 처리**:
1. 사용자가 회의 정보 입력 (제목, 날짜/시간, 장소, 참석자) 1. 사용자가 회의 정보 입력 (제목, 날짜/시간, 장소, 참석자)
2. Meeting Service: 회의 생성 및 DB 저장 2. Meeting Service: 회의 생성 및 DB 저장
3. Meeting Service: Redis 캐시 저장 (`meeting:info:{meetingId}`) 3. Meeting Service: Redis 캐시 저장 (`meeting:info:{meetingId}`)
4. Meeting Service: `MeetingCreated` 이벤트 발행 4. Meeting Service: `NotificationRequest` 이벤트 발행 (초대 알림)
5. Notification Service: 참석자 전원에게 초대 이메일 발송 5. Notification Service: 참석자 전원에게 초대 이메일 발송
6. AI Service: 회의 일정 분석 준비
--- ---
@ -380,11 +371,17 @@
[Meeting Service] → MeetingEnded 이벤트 발행 [Meeting Service] → MeetingEnded 이벤트 발행
┌───┴───┬───────┬────────┐ [STT Service]
↓ ↓ ↓ ↓ 음성 녹음 종료
STT AI Notify Meeting
음성 Todo 종료 Todo [Meeting Service]
종료 추출 알림 생성 ├─ Todo 생성 및 할당 (내부)
├─ 섹션별 검증 완료 (내부)
├─ 회의록 확정
└─ NotificationRequest 이벤트 발행
[Notification Service]
종료 알림 및 Todo 할당 알림 발송
``` ```
**단계별 처리**: **단계별 처리**:
@ -393,17 +390,13 @@ STT AI Notify Meeting
3. **STT Service** (구독): 3. **STT Service** (구독):
- 음성 녹음 중지 - 음성 녹음 중지
- 최종 STT 변환 완료 확인 - 최종 STT 변환 완료 확인
4. **AI Service** (구독): 4. **Meeting Service** (내부 처리):
- 최종 회의록 분석 - Todo 생성 및 할당
- Todo 자동 추출 및 담당자 식별
- 추출된 Todo 정보를 Meeting Service에 전송
5. **Meeting Service**:
- Todo 생성 및 할당 (내부 처리)
- 회의록 섹션 링크 연결 - 회의록 섹션 링크 연결
- `TodoCreated` 이벤트 발행 - 섹션별 검증 완료 처리
- 섹션별 검증 완료 처리 (내부 처리)
- 회의록 확정 (확정 버전 생성) - 회의록 확정 (확정 버전 생성)
6. **Notification Service** (구독): - `NotificationRequest` 이벤트 발행 (종료 알림, Todo 할당 알림)
5. **Notification Service** (구독):
- 회의 종료 알림 발송 - 회의 종료 알림 발송
- Todo 할당 알림 발송 - Todo 할당 알림 발송
@ -414,10 +407,13 @@ STT AI Notify Meeting
``` ```
[Todo 완료 처리] [Todo 완료 처리]
[Meeting Service] → TodoCompleted 이벤트 발행 [Meeting Service]
├─ Todo 상태 업데이트 (내부)
Notification ├─ 회의록 반영 (내부)
완료 알림 └─ NotificationRequest 이벤트 발행
[Notification Service]
완료 알림 발송
``` ```
**단계별 처리**: **단계별 처리**:
@ -425,7 +421,7 @@ Notification
2. Meeting Service: Todo 상태 업데이트 (완료 시간, 완료자 기록) 2. Meeting Service: Todo 상태 업데이트 (완료 시간, 완료자 기록)
3. Meeting Service: 관련 회의록에 완료 상태 자동 반영 (내부 처리) 3. Meeting Service: 관련 회의록에 완료 상태 자동 반영 (내부 처리)
4. Meeting Service: Redis 캐시 무효화 (`meeting:info:{meetingId}`) 4. Meeting Service: Redis 캐시 무효화 (`meeting:info:{meetingId}`)
5. Meeting Service: `TodoCompleted` 이벤트 발행 5. Meeting Service: `NotificationRequest` 이벤트 발행 (완료 알림)
6. **Notification Service** (구독): 6. **Notification Service** (구독):
- 회의록 작성자에게 완료 알림 발송 - 회의록 작성자에게 완료 알림 발송
- 모든 Todo 완료 시 전체 완료 알림 발송 - 모든 Todo 완료 시 전체 완료 알림 발송
@ -441,11 +437,13 @@ Notification
``` ```
[회의록 확정] → [공유 버튼 클릭] [회의록 확정] → [공유 버튼 클릭]
[Meeting Service] → 공유 링크 생성 [Meeting Service]
├─ 공유 링크 생성
[Notification Service] → 참석자 알림 발송 ├─ 다음 회의 일정 등록 (내부)
└─ NotificationRequest 이벤트 발행
[Meeting Service] → 다음 회의 일정 자동 등록 (언급된 경우)
[Notification Service]
공유 알림 발송
``` ```
**단계별 처리**: **단계별 처리**:
@ -453,8 +451,9 @@ Notification
2. Meeting Service: 공유 링크 생성 (고유 URL) 2. Meeting Service: 공유 링크 생성 (고유 URL)
3. Meeting Service: 공유 정보 DB 저장 (공유 시간, 대상, 권한) 3. Meeting Service: 공유 정보 DB 저장 (공유 시간, 대상, 권한)
4. Meeting Service: Redis 캐시 무효화 4. Meeting Service: Redis 캐시 무효화
5. Notification Service: 참석자 전원에게 이메일 알림 발송 5. Meeting Service: 다음 회의 일정이 언급된 경우 캘린더 자동 등록 (내부 처리)
6. Meeting Service: 다음 회의 일정이 언급된 경우 캘린더 자동 등록 6. Meeting Service: `NotificationRequest` 이벤트 발행 (공유 알림)
7. Notification Service: 참석자 전원에게 이메일 알림 발송
--- ---

View File

@ -88,7 +88,7 @@ graph TB
%% ======================================== %% ========================================
%% 이벤트 구독 정보 (노트) %% 이벤트 구독 정보 (노트)
%% ======================================== %% ========================================
Note1["📋 이벤트 구독 매핑<br/><br/>Meeting Service:<br/>- TranscriptSummaryCreated<br/><br/>STT Service:<br/>- MeetingEnded<br/><br/>AI Service:<br/>- MeetingCreated<br/>- MeetingEnded<br/>- TranscriptReady<br/><br/>Notification Service:<br/>- MeetingCreated<br/>- MeetingEnded<br/>- TranscriptCreated<br/>- TodoCreated<br/>- TodoCompleted"] Note1["📋 이벤트 구독 매핑<br/><br/>Meeting Service:<br/>- TranscriptSummaryCreated<br/><br/>STT Service:<br/>- MeetingEnded<br/><br/>AI Service:<br/>- TranscriptReady<br/><br/>Notification Service:<br/>- NotificationRequest"]
Note1 -.->|"참조"| EventHubs Note1 -.->|"참조"| EventHubs