hgzero/design/backend/logical/logical-architecture.mmd
kimjh 1b5efd76d8 논리 아키텍처 메시지 브로커 변경: RabbitMQ → Azure Event Hubs
- 메시지 브로커를 Azure Event Hubs로 변경
- Consumer Group을 통한 Pub/Sub 패턴 적용
- Partition 기반 부하 분산 및 순서 보장
- Event Hub 구성 정의 (meeting-events, transcript-events, todo-events)
- Throughput Units 자동 확장 설정 (2-10)
- Message Retention 1-7일 설정
- AMQP over TLS 암호화 적용
- ADR-002 업데이트 (Azure Event Hubs 선택 이유)
- Mermaid 다이어그램 업데이트

장점:
- 완전 관리형 서비스로 운영 부담 제거
- 초당 수백만 이벤트 고성능 스트리밍
- Azure Speech, Azure AI와 완벽한 생태계 통합
- Kafka 프로토콜 호환성
- 자동 확장 및 고가용성

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 14:33:54 +09:00

122 lines
5.5 KiB
Plaintext

graph TB
%% ========================================
%% 클라이언트 레이어
%% ========================================
subgraph Client["클라이언트 레이어"]
WebApp["웹 애플리케이션<br/>(React/Vue SPA)"]
end
%% ========================================
%% API Gateway 레이어
%% ========================================
subgraph Gateway["API Gateway 레이어"]
APIGateway["API Gateway<br/>- JWT 인증/인가<br/>- 서비스 라우팅<br/>- Rate Limiting<br/>- CORS 처리"]
end
%% ========================================
%% 마이크로서비스 레이어
%% ========================================
subgraph Services["마이크로서비스 레이어"]
%% 핵심 서비스
UserSvc["User Service<br/>- 사용자 인증 (LDAP)<br/>- JWT 토큰 발급"]
MeetingSvc["Meeting Service<br/>- 회의 생애주기 관리<br/>- 회의록 CRUD<br/>- 템플릿 관리<br/>- 회의 통계<br/>- Todo 관리<br/>- 실시간 동기화 (WebSocket)<br/>- 버전 관리"]
%% 전문 서비스
STTSvc["STT Service<br/>- 음성 녹음<br/>- 텍스트 변환<br/>- 화자 식별"]
AISvc["AI Service<br/>- 회의록 자동 작성<br/>- Todo 추출<br/>- 프롬프팅 개선<br/>- 전문용어 감지 (RAG)<br/>- 맥락 기반 설명 (RAG)<br/>- 관련 회의록 연결"]
%% 지원 서비스
NotifySvc["Notification Service<br/>- 알림 발송<br/>- 리마인더 관리"]
end
%% ========================================
%% 인프라 레이어
%% ========================================
subgraph Infrastructure["인프라 레이어"]
%% 캐시
Redis["Redis<br/>- 분산 캐시 (Cache-Aside)<br/>- 작업 상태 저장<br/>- 세션 관리"]
%% 메시지 브로커
EventHubs["Azure Event Hubs<br/>- Pub/Sub 패턴 (Consumer Groups)<br/>- Partition 기반 부하 분산<br/>- 이벤트 스트리밍"]
end
%% ========================================
%% 외부 시스템
%% ========================================
subgraph External["외부 시스템"]
AzureSpeech["Azure Speech<br/>(STT 엔진)"]
LLM["AI Model Server<br/>(LLM)"]
EmailSMS["Email/SMS Service"]
end
%% ========================================
%% 클라이언트 → API Gateway (동기)
%% ========================================
WebApp -->|"HTTPS<br/>모든 API 요청"| APIGateway
%% ========================================
%% API Gateway → 서비스 (동기 라우팅)
%% ========================================
APIGateway -->|"/api/users/**"| UserSvc
APIGateway -->|"/api/meetings/**<br/>/api/todos/**"| MeetingSvc
APIGateway -->|"/api/stt/**"| STTSvc
APIGateway -->|"/api/ai/**"| AISvc
APIGateway -->|"/api/notifications/**"| NotifySvc
%% ========================================
%% 클라이언트 → Meeting (WebSocket)
%% ========================================
WebApp -.->|"WebSocket<br/>실시간 동기화"| MeetingSvc
%% ========================================
%% 서비스 → Redis (캐시 우선 전략)
%% ========================================
MeetingSvc -.->|"Cache-Aside<br/>회의 정보/참여자/Todo"| Redis
AISvc -.->|"작업 상태 저장<br/>Async Request-Reply"| Redis
%% ========================================
%% 서비스 간 동기 통신 제거 (프론트엔드에서 사용자 정보 전송)
%% ========================================
%% ========================================
%% 서비스 → Event Hubs (이벤트 발행)
%% ========================================
MeetingSvc ==>|"이벤트 발행<br/>(meeting-events)"| EventHubs
STTSvc ==>|"이벤트 발행<br/>(transcript-events)"| EventHubs
AISvc ==>|"이벤트 발행<br/>(transcript-events)"| EventHubs
%% ========================================
%% 이벤트 구독 정보 (노트)
%% ========================================
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 -.->|"참조"| EventHubs
%% ========================================
%% 서비스 → 외부 시스템
%% ========================================
STTSvc -.->|"음성 변환 요청"| AzureSpeech
AISvc -.->|"LLM 요청"| LLM
NotifySvc -.->|"이메일/SMS 발송"| EmailSMS
%% ========================================
%% 스타일 정의
%% ========================================
classDef client fill:#e3f2fd,stroke:#1976d2,stroke-width:3px
classDef gateway fill:#fff9c4,stroke:#f57f17,stroke-width:3px
classDef core fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px
classDef special fill:#f8bbd0,stroke:#c2185b,stroke-width:2px
classDef support fill:#d1c4e9,stroke:#512da8,stroke-width:2px
classDef infra fill:#b2ebf2,stroke:#00838f,stroke-width:2px
classDef mq fill:#ffe0b2,stroke:#e65100,stroke-width:3px
classDef external fill:#cfd8dc,stroke:#455a64,stroke-width:2px
class WebApp client
class APIGateway gateway
class UserSvc,MeetingSvc core
class STTSvc,AISvc special
class NotifySvc support
class Redis infra
class EventHubs mq
class AzureSpeech,LLM,EmailSMS external