hgzero/design/backend/sequence/inner/meeting-회의종료.puml
kimjh 909025aa27 내부 시퀀스 설계 완료
- 총 21개 PlantUML 파일 생성 (Meeting 10개, AI 6개, STT 2개, Notification 3개)
- 서브 에이전트를 활용한 병렬 설계로 효율성 극대화
- 모든 시나리오는 유저스토리 및 외부 시퀀스와 1:1 매칭
- Controller → Service → Repository 계층 구조 명확히 표현
- Redis Cache, Azure Event Hubs 등 인프라 컴포넌트 표시
- 동기(→)/비동기(-->) 구분 명확
- 외부 참여자 <<E>> 표시 적용
- PlantUML 문법 검사 및 오류 수정 완료 (13개 파일 수정)
- par/and 블록 문법 오류 수정
- return 형식 적용으로 참여자 없는 화살표 오류 해결

설계 특징:
- 캐시 전략: Cache-Aside 패턴, TTL 관리, 즉시 무효화
- 비동기 처리: Azure Event Hubs 기반 이벤트 구독
- 실시간 협업: WebSocket 기반 동기화, 변경 델타 전송
- 데이터 일관성: 버전 관리, 양방향 연결, 트랜잭션 처리

추가 파일:
- claude/sequence-inner-design.md: 내부시퀀스설계 가이드
- tools/check-plantuml.ps1: PlantUML 문법 검사 스크립트

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 15:59:13 +09:00

163 lines
4.8 KiB
Plaintext

@startuml meeting-회의종료
!theme mono
title Meeting Service - 회의종료 내부 시퀀스
participant "MeetingController" as Controller
participant "MeetingService" as Service
participant "SessionService" as SessionService
participant "MeetingRepository" as MeetingRepo
participant "SessionRepository" as SessionRepo
participant "StatisticsService" as StatService
database "Meeting DB<<E>>" as DB
database "Redis Cache<<E>>" as Cache
queue "Azure Event Hubs<<E>>" as EventHub
[-> Controller: POST /meetings/{meetingId}/end
activate Controller
note over Controller
경로 변수: meetingId
사용자 정보: userId, userName, email
end note
Controller -> Controller: meetingId 유효성 검증
Controller -> Service: endMeeting(meetingId, userId)
activate Service
' 회의 정보 조회
Service -> MeetingRepo: findById(meetingId)
activate MeetingRepo
MeetingRepo -> DB: SELECT * FROM meetings WHERE id = ?
activate DB
DB --> MeetingRepo: 회의 정보
deactivate DB
MeetingRepo --> Service: Meeting
deactivate MeetingRepo
note over Service
비즈니스 규칙 검증:
- 회의가 존재하는지 확인
- 회의 종료 권한 확인 (생성자만)
- 회의 상태 확인 (IN_PROGRESS만 종료 가능)
end note
Service -> Service: 권한 검증\n(생성자만 종료 가능)
Service -> Service: 회의 상태 확인
alt 회의가 진행 중이 아님
Service --> Controller: 409 Conflict\n진행 중인 회의가 아님
return 409 Conflict
else 종료 가능
' 세션 정보 조회
Service -> SessionRepo: findActiveSession(meetingId)
activate SessionRepo
SessionRepo -> DB: SELECT * FROM meeting_sessions\nWHERE meetingId = ?\nAND status = 'ACTIVE'
activate DB
DB --> SessionRepo: 세션 정보
deactivate DB
SessionRepo --> Service: Session
deactivate SessionRepo
' 세션 종료
Service -> SessionRepo: endSession(sessionId)
activate SessionRepo
SessionRepo -> DB: UPDATE meeting_sessions\nSET status = 'ENDED',\n endedAt = NOW()\nWHERE id = ?
activate DB
DB --> SessionRepo: 업데이트 완료
deactivate DB
SessionRepo --> Service: 종료 성공
deactivate SessionRepo
' 회의 상태 업데이트
Service -> MeetingRepo: updateStatus(meetingId, "ENDED")
activate MeetingRepo
MeetingRepo -> DB: UPDATE meetings\nSET status = 'ENDED',\n actualEndTime = NOW()\nWHERE id = ?
activate DB
DB --> MeetingRepo: 업데이트 완료
deactivate DB
MeetingRepo --> Service: 업데이트 성공
deactivate MeetingRepo
note over Service
회의 통계 생성:
- 회의 총 시간
- 참석자 수
- 발언 횟수 (STT 데이터 기반)
- 주요 키워드
end note
' 회의 통계 생성
Service -> StatService: generateMeetingStatistics(sessionId)
activate StatService
StatService -> DB: SELECT\n COUNT(DISTINCT speakerId) as speakerCount,\n COUNT(*) as utteranceCount,\n TIMESTAMPDIFF(MINUTE, startedAt, endedAt) as duration\nFROM transcripts WHERE sessionId = ?
activate DB
DB --> StatService: 통계 데이터
deactivate DB
StatService -> DB: INSERT INTO meeting_statistics\n(meetingId, sessionId, duration,\nparticipantCount, utteranceCount, createdAt)
activate DB
DB --> StatService: 통계 저장 완료
deactivate DB
StatService --> Service: Statistics
deactivate StatService
' 회의록 상태 업데이트
Service -> MeetingRepo: updateMinutesStatus(meetingId, "DRAFT")
activate MeetingRepo
MeetingRepo -> DB: UPDATE minutes\nSET status = 'DRAFT',\n endedAt = NOW()\nWHERE meetingId = ?\nAND status = 'IN_PROGRESS'
activate DB
DB --> MeetingRepo: 업데이트 완료
deactivate DB
MeetingRepo --> Service: 업데이트 성공
deactivate MeetingRepo
' 캐시 무효화
Service -> Cache: DELETE meeting:info:{meetingId}
activate Cache
Cache --> Service: 삭제 완료
deactivate Cache
note over Service
비동기 이벤트 발행:
- STT 서비스에 녹음 중지 요청
- AI 서비스에 최종 회의록 생성 요청
- 참석자에게 회의 종료 알림
end note
' 이벤트 발행
Service -> EventHub: publish(MeetingEnded)\n{\n meetingId, sessionId,\n endedAt, statistics,\n minutesId\n}
activate EventHub
EventHub --> Service: 발행 완료
deactivate EventHub
Service --> Controller: MeetingEndResponse
deactivate Service
note over Controller
응답 데이터:
{
"meetingId": "uuid",
"sessionId": "uuid",
"status": "ENDED",
"endedAt": "2025-01-23T15:00:00",
"statistics": {
"duration": 60,
"participantCount": 5,
"utteranceCount": 120
},
"minutesId": "uuid"
}
end note
return 200 OK\nMeetingEndResponse
end
deactivate Controller
@enduml