mirror of
https://github.com/ktds-dg0501/kt-event-marketing.git
synced 2025-12-06 12:06:24 +00:00
analytics-링고비즈추가
대시보드 조회 내부 시퀀스에 링고비즈 API 호출 추가 - 병렬 API 호출에 링고비즈 추가 (CompletableFuture 4개로 확장) - Circuit Breaker 및 Fallback 전략 적용 - 데이터 통합 섹션에 링고비즈 통화 완료 수 포함
This commit is contained in:
parent
146063b22b
commit
447d6b8e5d
@ -117,8 +117,8 @@ else Cache MISS
|
||||
|
||||
note right of Service
|
||||
**병렬 처리 시작**
|
||||
- CompletableFuture 3개 생성
|
||||
- 우리동네TV, 지니TV, SNS APIs 동시 호출
|
||||
- CompletableFuture 4개 생성
|
||||
- 우리동네TV, 지니TV, 링고비즈, SNS APIs 동시 호출
|
||||
- Circuit Breaker 적용 (채널별 독립)
|
||||
end note
|
||||
|
||||
@ -188,6 +188,41 @@ else Cache MISS
|
||||
deactivate ChannelService
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
Service -> ChannelService: getRingoBizStats(eventId)
|
||||
activate ChannelService
|
||||
|
||||
ChannelService -> CB: execute("ringoBiz", () -> callAPI())
|
||||
activate CB
|
||||
|
||||
note right of CB
|
||||
**Circuit Breaker**
|
||||
- State: CLOSED (정상)
|
||||
- Failure Rate: 50% 초과 시 OPEN
|
||||
- Timeout: 10초
|
||||
end note
|
||||
|
||||
CB -> CB: 외부 API 호출\nGET /voice-stats/{eventId}
|
||||
|
||||
alt 정상 응답
|
||||
CB --> ChannelService: ChannelStats\n- calls: 3000\n- completed: 2500\n- avgDuration: 45초
|
||||
deactivate CB
|
||||
ChannelService --> Service: RingoBizStats
|
||||
deactivate ChannelService
|
||||
else Timeout 또는 장애
|
||||
CB -> CB: **Fallback 실행**\n기본값 반환
|
||||
note right of CB
|
||||
링고비즈 API 장애:
|
||||
- 기본값 (0) 반환
|
||||
- 알림: "링고비즈 데이터 로딩 실패"
|
||||
end note
|
||||
CB --> ChannelService: 기본값 (0)
|
||||
deactivate CB
|
||||
ChannelService --> Service: RingoBizStats (기본값)
|
||||
deactivate ChannelService
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
Service -> ChannelService: getSNSStats(eventId)
|
||||
@ -229,13 +264,14 @@ else Cache MISS
|
||||
|||
|
||||
== 3. 데이터 통합 및 ROI 계산 ==
|
||||
|
||||
Service -> Service: mergeChannelStats(\n wooriTV, genieTV, sns\n)
|
||||
Service -> Service: mergeChannelStats(\n wooriTV, genieTV, ringoBiz, sns\n)
|
||||
|
||||
note right of Service
|
||||
**데이터 통합**
|
||||
- 총 노출 수 = 외부 채널 노출 합계
|
||||
- 총 참여자 수 = Analytics DB
|
||||
- 채널별 전환율 = 참여자 수 / 노출 수
|
||||
- 링고비즈: 통화 완료 수 포함
|
||||
end note
|
||||
|
||||
Service -> Calculator: calculateROI(\n eventStats, channelStats\n)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user