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

124 lines
3.4 KiB
Plaintext

@startuml meeting-회의예약
!theme mono
title Meeting Service - 회의예약 내부 시퀀스
participant "MeetingController" as Controller
participant "MeetingService" as Service
participant "MeetingRepository" as Repo
participant "ParticipantRepository" as ParticipantRepo
database "Meeting DB<<E>>" as DB
database "Redis Cache<<E>>" as Cache
queue "Azure Event Hubs<<E>>" as EventHub
[-> Controller: POST /meetings
activate Controller
note over Controller
요청 데이터:
{
"title": "회의 제목",
"startTime": "2025-01-23T14:00:00",
"endTime": "2025-01-23T15:00:00",
"location": "회의실 A",
"participants": ["user1@example.com", ...]
}
사용자 정보: userId, userName, email
end note
Controller -> Controller: 입력 검증\n- 제목 필수 (최대 100자)\n- 날짜/시간 필수\n- 참석자 최소 1명
Controller -> Service: createMeeting(request, userId)
activate Service
note over Service
비즈니스 규칙 검증:
- 회의 시간 유효성 (시작 < 종료)
- 중복 회의 체크
- 참석자 유효성 검증
end note
Service -> Service: 회의 시간 유효성 검사
Service -> Repo: checkConflictingMeetings(userId, startTime, endTime)
activate Repo
Repo -> DB: SELECT COUNT(*) FROM meetings\nWHERE creatorId = ?\nAND status = 'SCHEDULED'\nAND (startTime <= ? AND endTime >= ?)
activate DB
DB --> Repo: 중복 회의 개수
deactivate DB
Repo --> Service: int count
deactivate Repo
alt 중복 회의 존재
Service --> Controller: 409 Conflict\n중복된 회의 시간
return 409 Conflict
else 중복 없음
Service -> Service: Meeting 엔티티 생성\n- 회의 ID 생성\n- 상태: SCHEDULED\n- 생성자 정보 설정
' 회의 정보 저장
Service -> Repo: save(meeting)
activate Repo
Repo -> DB: INSERT INTO meetings\n(id, title, startTime, endTime,\nlocation, status, creatorId, createdAt)
activate DB
DB --> Repo: 회의 저장 완료
deactivate DB
Repo --> Service: Meeting
deactivate Repo
' 참석자 저장
Service -> ParticipantRepo: saveAll(participants)
activate ParticipantRepo
ParticipantRepo -> DB: INSERT INTO participants\n(meetingId, email, role, status)
activate DB
DB --> ParticipantRepo: 참석자 저장 완료
deactivate DB
ParticipantRepo --> Service: List<Participant>
deactivate ParticipantRepo
' 캐시 저장
Service -> Cache: SET meeting:info:{meetingId}\n(TTL: 10분)
activate Cache
Cache --> Service: 캐싱 완료
deactivate Cache
Service -> Cache: SET meeting:participants:{meetingId}\n(TTL: 10분)
activate Cache
Cache --> Service: 캐싱 완료
deactivate Cache
note over Service
비동기 이벤트 발행:
- 초대 이메일 발송
- 캘린더 등록
- 리마인더 스케줄링
end note
' 이벤트 발행
Service -> EventHub: publish(MeetingCreated)\n{\n meetingId, title, startTime,\n participants, creatorInfo\n}
activate EventHub
EventHub --> Service: 발행 완료
deactivate EventHub
Service --> Controller: MeetingResponse
deactivate Service
note over Controller
응답 데이터:
{
"meetingId": "uuid",
"title": "회의 제목",
"startTime": "...",
"endTime": "...",
"location": "...",
"participants": [...],
"status": "SCHEDULED"
}
end note
return 201 Created\nMeetingResponse
end
deactivate Controller
@enduml