논리 아키텍처 수정
주요 변경사항: - User Service 사업자번호 검증 로직 삭제 (국세청 API 제거) - User Service → Event Service 회원정보 제공 API 추가 - Redis 기반 서비스 간 데이터 공유 구조로 변경 - AI Service → Redis 저장 → Content Service 읽기 - Participation Service 참여자 목록 조회 기능 추가 - WinnerSelected 이벤트 토픽 제거 (3개 토픽으로 축소) - Redis → Event DB 저장 로직 추가 (이벤트 publish 시) - AI/Content Service Timeout 5분으로 변경 (30초/20초 → 300초) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -3,34 +3,35 @@ graph TB
|
||||
|
||||
%% Services
|
||||
subgraph "Services"
|
||||
UserSvc["User Service<br/>• 회원가입/로그인<br/>• 프로필 관리<br/>• 사업자번호 검증<br/>[Circuit Breaker]"]
|
||||
EventSvc["Event Service<br/>• 이벤트 생성/수정/삭제<br/>• 플로우 오케스트레이션<br/>• AI/이미지 작업 요청<br/>• 배포 작업 요청"]
|
||||
PartSvc["Participation<br/>Service<br/>• 참여 접수<br/>• 당첨자 추첨"]
|
||||
UserSvc["User Service<br/>• 회원가입/로그인<br/>• 프로필 관리<br/>• 회원정보 제공"]
|
||||
EventSvc["Event Service<br/>• 이벤트 생성/수정/삭제<br/>• 플로우 오케스트레이션<br/>• AI 작업 요청<br/>• 배포 작업 요청<br/>• Redis → DB 저장"]
|
||||
PartSvc["Participation<br/>Service<br/>• 참여 접수<br/>• 참여자 목록<br/>• 당첨자 추첨"]
|
||||
AnalSvc["Analytics Service<br/>• 실시간 대시보드<br/>• 성과 분석<br/>• 채널별 통계<br/>[Circuit Breaker]"]
|
||||
end
|
||||
|
||||
%% Async Services
|
||||
subgraph "Async Services"
|
||||
AISvc["AI Service<br/>• 트렌드 분석<br/>• 이벤트 추천<br/>[Circuit Breaker]<br/>[Timeout: 30s]"]
|
||||
ContentSvc["Content Service<br/>• SNS 이미지 생성<br/>• 3가지 스타일<br/>[Circuit Breaker]<br/>[Timeout: 20s]"]
|
||||
AISvc["AI Service<br/>• 트렌드 분석<br/>• 이벤트 추천<br/>• Redis 저장<br/>[Circuit Breaker]<br/>[Timeout: 5분]"]
|
||||
ContentSvc["Content Service<br/>• Redis 데이터 읽기<br/>• SNS 이미지 생성<br/>• Redis 저장<br/>[Circuit Breaker]<br/>[Timeout: 5분]"]
|
||||
DistSvc["Distribution<br/>Service<br/>• 다중 채널 배포<br/>[Circuit Breaker]<br/>[Retry: 3회]<br/>[Bulkhead]"]
|
||||
end
|
||||
|
||||
%% Kafka (Event Bus + Job Queue)
|
||||
Kafka["Kafka<br/>━━━━━━━━━━<br/><Event Topics><br/>• EventCreated<br/>• ParticipantRegistered<br/>• WinnerSelected<br/>• DistributionCompleted<br/>━━━━━━━━━━<br/><Job Topics><br/>• ai 이벤트 생성<br/>• 이미지 생성"]
|
||||
Kafka["Kafka<br/>━━━━━━━━━━<br/><Event Topics><br/>• EventCreated<br/>• ParticipantRegistered<br/>• DistributionCompleted<br/>━━━━━━━━━━<br/><Job Topics><br/>• ai 이벤트 생성"]
|
||||
|
||||
%% External System
|
||||
External["외부시스템<br/>[Circuit Breaker]<br/>━━━━━━━━━━<br/>• 국세청 API<br/>• AI API<br/>• 이미지 생성 API<br/>• 배포 채널 APIs<br/>(비동기)"]
|
||||
External["외부시스템<br/>[Circuit Breaker]<br/>━━━━━━━━━━<br/>• AI API<br/>• 이미지 생성 API<br/>• 배포 채널 APIs<br/>(비동기)"]
|
||||
|
||||
%% Redis
|
||||
Redis["Redis Cache<br/>━━━━━━━━━━<br/>• AI 결과<br/>• 이미지 URL<br/>• 이벤트 데이터"]
|
||||
|
||||
%% Event Publishing
|
||||
EventSvc ==>|"EventCreated<br/>발행"| Kafka
|
||||
PartSvc ==>|"ParticipantRegistered<br/>발행"| Kafka
|
||||
PartSvc ==>|"WinnerSelected<br/>발행"| Kafka
|
||||
DistSvc ==>|"DistributionCompleted<br/>발행"| Kafka
|
||||
|
||||
%% Job Publishing (비동기 작업 요청)
|
||||
EventSvc -->|"ai 이벤트 생성 발행"| Kafka
|
||||
EventSvc -->|"이미지 생성 발행"| Kafka
|
||||
|
||||
%% Event Subscription
|
||||
Kafka -.->|"EventCreated<br/>구독"| AnalSvc
|
||||
@@ -39,13 +40,18 @@ graph TB
|
||||
|
||||
%% Job Subscription
|
||||
Kafka -.->|"ai 이벤트 생성 구독"| AISvc
|
||||
Kafka -.->|"이미지 생성 구독"| ContentSvc
|
||||
|
||||
%% Service to Service (동기 호출)
|
||||
EventSvc -->|"다중 채널 배포<br/>[Circuit Breaker]"| DistSvc
|
||||
EventSvc -->|"회원정보 조회"| UserSvc
|
||||
|
||||
%% Redis Interactions
|
||||
AISvc -->|"AI 결과 저장"| Redis
|
||||
ContentSvc -->|"AI 데이터 읽기"| Redis
|
||||
ContentSvc -->|"이미지 URL 저장"| Redis
|
||||
EventSvc -->|"Redis → DB 저장"| Redis
|
||||
|
||||
%% Services to External (Resilience 패턴)
|
||||
UserSvc -->|"사업자번호 검증<br/>[Retry: 3회]"| External
|
||||
AISvc -->|"트렌드 분석/추천"| External
|
||||
ContentSvc -->|"이미지 생성"| External
|
||||
DistSvc -->|"다중 채널 배포<br/>(비동기)"| External
|
||||
@@ -56,8 +62,10 @@ graph TB
|
||||
classDef async fill:#8B5CF6,stroke:#7C3AED,stroke-width:3px,color:#fff
|
||||
classDef kafka fill:#F59E0B,stroke:#D97706,stroke-width:3px
|
||||
classDef external fill:#E5E7EB,stroke:#9CA3AF,stroke-width:2px
|
||||
classDef cache fill:#EF4444,stroke:#DC2626,stroke-width:3px
|
||||
|
||||
class UserSvc,EventSvc,PartSvc,AnalSvc service
|
||||
class AISvc,ContentSvc,DistSvc async
|
||||
class Kafka kafka
|
||||
class External external
|
||||
class Redis cache
|
||||
|
||||
Reference in New Issue
Block a user