mirror of
https://github.com/ktds-dg0501/kt-event-marketing.git
synced 2026-06-13 14:19:11 +00:00
물리아키텍처 설계 완료
✨ 주요 기능 - Azure 기반 물리아키텍처 설계 (개발환경/운영환경) - 7개 마이크로서비스 물리 구조 설계 - 네트워크 아키텍처 다이어그램 작성 (Mermaid) - 환경별 비교 분석 및 마스터 인덱스 문서 📁 생성 파일 - design/backend/physical/physical-architecture.md (마스터) - design/backend/physical/physical-architecture-dev.md (개발환경) - design/backend/physical/physical-architecture-prod.md (운영환경) - design/backend/physical/*.mmd (4개 Mermaid 다이어그램) 🎯 핵심 성과 - 비용 최적화: 개발환경 월 $143, 운영환경 월 $2,860 - 확장성: 개발환경 100명 → 운영환경 10,000명 (100배) - 가용성: 개발환경 95% → 운영환경 99.9% - 보안: 다층 보안 아키텍처 (L1~L4) 🛠️ 기술 스택 - Azure Kubernetes Service (AKS) - Azure Database for PostgreSQL Flexible - Azure Cache for Redis Premium - Azure Service Bus Premium - Application Gateway + WAF 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,171 @@
|
||||
@startuml
|
||||
!theme mono
|
||||
|
||||
title Distribution Service 클래스 다이어그램 (요약)
|
||||
|
||||
package "com.kt.distribution" {
|
||||
|
||||
package "controller" {
|
||||
class DistributionController <<Controller>>
|
||||
}
|
||||
|
||||
package "service" {
|
||||
class DistributionService <<Service>>
|
||||
class KafkaEventPublisher <<Service>>
|
||||
}
|
||||
|
||||
package "adapter" {
|
||||
interface ChannelAdapter <<Interface>>
|
||||
abstract class AbstractChannelAdapter <<Abstract>>
|
||||
class UriDongNeTvAdapter <<Adapter>>
|
||||
class RingoBizAdapter <<Adapter>>
|
||||
class GiniTvAdapter <<Adapter>>
|
||||
class InstagramAdapter <<Adapter>>
|
||||
class NaverAdapter <<Adapter>>
|
||||
class KakaoAdapter <<Adapter>>
|
||||
}
|
||||
|
||||
package "dto" {
|
||||
class DistributionRequest <<DTO>>
|
||||
class DistributionResponse <<DTO>>
|
||||
class ChannelDistributionResult <<DTO>>
|
||||
class DistributionStatusResponse <<DTO>>
|
||||
class ChannelStatus <<DTO>>
|
||||
enum ChannelType <<Enum>>
|
||||
}
|
||||
|
||||
package "repository" {
|
||||
class DistributionStatusRepository <<Repository>>
|
||||
interface DistributionStatusJpaRepository <<JPA Repository>>
|
||||
}
|
||||
|
||||
package "entity" {
|
||||
class DistributionStatus <<Entity>>
|
||||
class ChannelStatusEntity <<Entity>>
|
||||
}
|
||||
|
||||
package "mapper" {
|
||||
class DistributionStatusMapper <<Mapper>>
|
||||
}
|
||||
|
||||
package "event" {
|
||||
class DistributionCompletedEvent <<Event>>
|
||||
class DistributedChannelInfo <<Event>>
|
||||
}
|
||||
|
||||
package "config" {
|
||||
class KafkaConfig <<Configuration>>
|
||||
class OpenApiConfig <<Configuration>>
|
||||
class WebConfig <<Configuration>>
|
||||
}
|
||||
}
|
||||
|
||||
' 주요 관계만 표시
|
||||
DistributionController --> DistributionService
|
||||
DistributionService --> ChannelAdapter
|
||||
DistributionService --> KafkaEventPublisher
|
||||
DistributionService --> DistributionStatusRepository
|
||||
|
||||
AbstractChannelAdapter ..|> ChannelAdapter
|
||||
UriDongNeTvAdapter --|> AbstractChannelAdapter
|
||||
RingoBizAdapter --|> AbstractChannelAdapter
|
||||
GiniTvAdapter --|> AbstractChannelAdapter
|
||||
InstagramAdapter --|> AbstractChannelAdapter
|
||||
NaverAdapter --|> AbstractChannelAdapter
|
||||
KakaoAdapter --|> AbstractChannelAdapter
|
||||
|
||||
DistributionStatusRepository --> DistributionStatusJpaRepository
|
||||
DistributionStatusRepository --> DistributionStatusMapper
|
||||
DistributionStatusJpaRepository ..> DistributionStatus
|
||||
|
||||
DistributionStatus "1" *-- "many" ChannelStatusEntity
|
||||
|
||||
KafkaEventPublisher ..> DistributionCompletedEvent
|
||||
DistributionCompletedEvent --> DistributedChannelInfo
|
||||
|
||||
note top of DistributionController
|
||||
**Controller 메소드 - API 매핑**
|
||||
|
||||
distribute: POST /distribution/distribute
|
||||
- 다중 채널 배포 요청
|
||||
|
||||
getDistributionStatus: GET /distribution/{eventId}/status
|
||||
- 배포 상태 조회
|
||||
end note
|
||||
|
||||
note top of DistributionService
|
||||
**핵심 비즈니스 로직**
|
||||
|
||||
• 다중 채널 병렬 배포
|
||||
• ExecutorService 기반 비동기 처리
|
||||
• 배포 상태 관리 (저장/조회)
|
||||
• Kafka 이벤트 발행
|
||||
|
||||
distribute(request)
|
||||
→ 병렬 배포 실행
|
||||
→ 결과 집계
|
||||
→ 상태 저장
|
||||
→ 이벤트 발행
|
||||
end note
|
||||
|
||||
note top of AbstractChannelAdapter
|
||||
**Resilience4j 패턴 적용**
|
||||
|
||||
• Circuit Breaker
|
||||
• Retry (지수 백오프)
|
||||
• Bulkhead (리소스 격리)
|
||||
• Fallback 처리
|
||||
|
||||
각 채널별 독립적 장애 격리
|
||||
end note
|
||||
|
||||
note top of DistributionStatusRepository
|
||||
**배포 상태 영구 저장**
|
||||
|
||||
• PostgreSQL 저장
|
||||
• JPA Repository 패턴
|
||||
• Entity ↔ DTO 매핑
|
||||
|
||||
save(eventId, status)
|
||||
findByEventId(eventId)
|
||||
end note
|
||||
|
||||
note right of ChannelType
|
||||
**배포 채널 종류**
|
||||
|
||||
TV 채널:
|
||||
• URIDONGNETV (우리동네TV)
|
||||
• GINITV (지니TV)
|
||||
|
||||
CALL 채널:
|
||||
• RINGOBIZ (링고비즈)
|
||||
|
||||
SNS 채널:
|
||||
• INSTAGRAM
|
||||
• NAVER (Blog)
|
||||
• KAKAO (Channel)
|
||||
end note
|
||||
|
||||
note bottom of DistributionStatus
|
||||
**배포 상태 엔티티**
|
||||
|
||||
전체 배포 상태 관리:
|
||||
• PENDING: 대기중
|
||||
• IN_PROGRESS: 진행중
|
||||
• COMPLETED: 완료
|
||||
• PARTIAL_FAILURE: 부분성공
|
||||
• FAILED: 실패
|
||||
|
||||
1:N 관계로 채널별 상태 관리
|
||||
end note
|
||||
|
||||
note bottom of KafkaEventPublisher
|
||||
**Kafka 이벤트 발행**
|
||||
|
||||
Topic: distribution-completed
|
||||
|
||||
배포 완료 시 이벤트 발행
|
||||
→ Analytics Service 소비
|
||||
end note
|
||||
|
||||
@enduml
|
||||
Reference in New Issue
Block a user