mermaid๋ก ์์ฑ๋ ๊ณผ์ ๋ ๋งํฌ๋ค์ด ํ์ผ(WBS.md)๋ก ์ฌ๋ ค์ฃผ์๋ฉด ๋ฉ๋๋ค. (md ํ์ผ ๋ด์ ๊ธฐ์กด ๊ตฌ์กฐ๋ฅผ ๋ฃ์ด์ฃผ์ธ์)
๋ณ๋ ์ํคํ์ณ๋ ๋ชจ๋ธ๋ง ๋๊ตฌ๋ฅผ ์ฌ์ฉํ ๊ฒฝ์ฐ์๋ ๋งํฌ๋ค์ด ํ์ผ(WBS.md)๊ณผ png, gif, jpg, pdf ํ์ผ ํ์์ผ๋ก WBS-{gitID}.png ํ์ผ๋ช ์ผ๋ก upload ํด์ฃผ์ธ์
- ๊ฐ์ ํ๋ ค๋ ํ๋ก์ ํธ์ ์ต์ข
์ค๊ณ
- ๋ณ๊ฒฝ ์ฌํญ์ ๋ํ Target ์์คํ ์ค๊ณ๋ฅผ ํ์ ํ๋ค. (2์ฃผ์ฐจ ๋ฏธ์ ํ์ฉ)
- ๋ณ๊ฒฝ ์ฌํญ์ ๋ํ ๊ธฐ๋ํจ๊ณผ๋ฅผ ํ์ ํ๋ค. (2์ฃผ์ฐจ ๋ฏธ์ ํ์ฉ)
- task list ๋์ถ
- ํ ์์คํ ์์ ๋ณ๊ฒฝ๋๋ ๋ถ๋ถ์ class diagram(DB๋ณ๊ฒฝ์ด ๋ฐ์ํ ๊ฒฝ์ฐ ERD์ถ๊ฐ)์ผ๋ก ์์ฑ
- ๋ณ๊ฒฝ, ์ถ๊ฐ ๋ ํ๋ก๊ทธ๋จ๋ค์ ์์ ๋ชฉ๋ก์ ์์ฑํ๋ค.
- ์ผ์ ๊ณํ ๋ฌธ์ (WBS)
- ์์ ๋ชฉ๋ก์ ์์์ผ์ ์ ์ฐ์ ํ๋ค.
- ์์ ๋ชฉ๋ก์ ์์กด์ฑ์ ์ ์ ํ๋ค.
- ์์ ๋ชฉ๋ก์ ์ ์ฒด ์ผ์ ์ ์์ฑํ๋ค.
- ์งํ ์ํ๋ฅผ checkํ๊ธฐ์ํ ๋ง์ผ์คํค ์ค์ ํ๋ค.
- ๋งค์ผ ์ ๋ ์ ๊ฒฐ์ ๋ฐ์ดํฐ์ค timeout์ด ๋ฐ์ํ ๊ฒฐ์ ๊ฑด์ ๋ํ ๋ฆฌํฌํธ๋ฅผ ๋ฐ์์ ํด๋น๊ฑด์ ํ์ธ ํ๊ณ ์๋ค.
- timeout์ด ๋ฐ์ํ์์ ๊ฒฝ์ฐ ํด๋น ๊ฑด์ด PG์์ ๊ฒฐ์ ๊ฐ ๋์๋์ง ์๋์๋์ง? ์์ ์๊ธฐ ๋๋ฌธ์ ํด๋น ์น์ธ๊ฑด์ key๋ฅผ pg์ฌ์ ๊ด๋ฆฌ์ ํ์ด์ง์์ ํ๋ํ๋ ํ์ธ ํ๋ค.
- ์น์ธ๋์๋ค๋ฉด ํด๋น ๊ฑด์ ์ทจ์ํ๊ณ ์ด์DB์ ๊ฒฐ์ ์คํจ๋ก ์๊ธฐ ์ฒ๋ฆฌํ๋ค.
- ์น์ธ์ด ๋์ง ์์๋ค๋ฉด ์ด์DB์ ๊ฒฐ์ ์คํจ๋ก ์๊ธฐ ์ฒ๋ฆฌํ๋ค.
- ๋งค์ผ timeout๊ฑด์ ํ์ธํ๊ณ ์ฒ๋ฆฌํ๋๋ฐ ํ๋ฃจ 2์๊ฐ์ฉ ๊ณ ์ ์ ์ธ ๋น์ฉ์ด ๋ฐ์ํ๊ณ ์๋ค.
flowchart TB
A[Start] --์ฃผ๋ฌธ์์ฒญ--> B(์น์ธ)
B --> C{PG์์ฒญ}
C -- Success --> D[์ฃผ๋ฌธ์๋ฃ]
C -- Fail --> E[๊ฒฐ์ ์ทจ์]
C -- Timeout --> F[๋ฐ์ดํฐ๋ณด์ ]
- AS-IS ๊ตฌ์กฐ์์ ๊ฐ์ ์ ํ ๋ ์ํฅ์ ๋ฐ๊ฒ๋๋ class diagram์ ์์ฑํ๋ค.
classDiagram
class PaymentMethod {
+String paymentMethodID
pay()
cancel()
}
PaymentMethod <|-- Card
PaymentMethod <|-- Bank
class PG {
+String pgID
pay()
cancel()
}
PG <|-- Card
PG <|-- Bank
class Payment {
+String paymentID
+String transactionID
void pay()
}
class Cancel {
+String cancelID
+PaymentID paymentID
+String transactionID
void cancel()
}
class CancelDetail {
+String cancelDetailID
+String cancelID
}
class PaymentDetail {
+PaymentID paymentID
}
class Card {
CardID
pay()
cancel()
checkTransaction()
}
note for Card "checkTransaction() : ๊ฒฐ์ ๋ด์ญํ์ธ"
class Bank {
BankID
pay()
cancel()
checkTransaction()
}
note for Bank "checkTransaction() : ๊ฒฐ์ ๋ด์ญํ์ธ"
Payment "1" -- "*" PaymentDetail : ๊ฒฐ์ ์๋จ, ๊ธ์ก, ์ํ ์ ๋ณด
Cancel "1" -- "*" CancelDetail : ๊ฒฐ์ ์๋จ, ๊ธ์ก, ์ํ ์ ๋ณด
Cancel "0..1" --> "1" Payment : ์๊ฒฐ์ ์ ๋ณด
Payment --> PaymentMethod : ๊ฒฐ์ ์์ฒญ
Cancel --> PaymentMethod : ์ทจ์์์ฒญ
-AS-IS ๊ตฌ์กฐ์์ ๊ฐ์ ์ ํ ๋ ์ํฅ์ ๋ฐ๊ฒ๋๋ ERD๋ฅผ ์์ฑํ๋ค.
erDiagram
Payment {
Integer id
String name
}
Payment ||--|{ PaymentDetail : has
PaymentMethod {
Integer id
String name
}
PaymentDetail {
Integer id
Integer paymentId
Integer paymentMethodId
Long productId
Integer amount
Integer quantity
Integer unitPrice
String productInfo
}
PaymentDetail ||--|{ PaymentMethod : fundingsource
Cancel {
Integer id
Integer paymentId
String transactionId
}
Cancel ||--|{ CancelDetail : has
CancelDetail ||--|{ PaymentMethod : fundingsource
CancelDetail {
Integer id
Integer cancelId
Integer amount
String productInfo
}
PaymentDetail {
String paymentId
String paymentMethodId
}
CancelDetail {
String cancelId
}
- timeout ๊ฑด์ ์ฒ๋ฆฌํ๋๋ฐ ๋งค์ผ ์์๋๋ 2์๊ฐ์ ์ ๋ฌด ์๊ฐ์ 30๋ถ ๋ด์ธ๋ก ์ค์ผ ์ ์๋ค.
- ์ฌ๋์ด ์ง์ ํ๋ ๋ถ๋ถ์ ์๋ํ ํ์ฌ ์ค์๋ฅผ ์ค์ผ ์ ์๋ค.
- ๊ฐ๋ ๊ฒฐ์ ๊ฐ ๋์๋๋ฐ timeout๊ฑด์ผ๋ก ๋์์ผ๋ ์๊ธฐ์ฒ๋ฆฌ์ ๋๋ฝ๋ ๊ฒฝ์ฐ ๊ณ ๊ฐ์ CS ํด๋์์ด ์ธ์ ๋๊ณ ์ข์ง์์ ๊ณ ๊ฐ๊ฒฝํ์ ์ค๋ค.
- timeout ๊ฐค์ CS์ธ์ ๊ฑด 1๊ฑด/week ์ 0๊ฑด์ผ๋ก ์ค์ผ ์ ์๋ค.
- ์ต์ผ ์ฒ๋ฆฌ๋๋ ํ๋ก์ธ์ค๋ฅผ 5๋ถ๋จ์์ batch๋ก ์ฒ๋ฆฌํ์ฌ์ ๊ณ ๊ฐ๋ง์กฑ์ ์ค ์ ์๋ค.
- ์ฃผ๋ฌธ์ ์คํจ ํ์ง๋ง ๊ฒฐ์ ๊ฐ ๋์๋ค๋ CS ๊ฑด 3๊ฑด/week๋ฅผ 0๊ฑด์ผ๋ก ์ค์ผ ์ ์๋ค.
flowchart TB
G[Start] --์ฃผ๋ฌธ์์ฒญ --> H(์น์ธ)
H --> I(PG์์ฒญ)
I -- Success --> J[์ฃผ๋ฌธ์๋ฃ]
I -- Fail --> K[๊ฒฐ์ ์ทจ์]
I -- Timeout --> L[์ฌ์ฒ๋ฆฌ]
L -- ์น์ธํ์ธ --> M(PG)
M -- ๊ฒฐ์ ์คํจ --> Z(์๋ฃ)
M -- ๊ฒฐ์ ์ฑ๊ณต --> O(์น์ธ์ทจ์)
O --> Z
- class diagram
classDiagram
class PaymentMethod {
+String paymentMethodID
pay()
cancel()
}
PaymentMethod <|-- Card
PaymentMethod <|-- Bank
class PG {
+String pgID
pay()
cancel()
}
PG <|-- Card
PG <|-- Bank
class Payment {
+String paymentID
+String transactionID
void pay()
}
class Cancel {
+String cancelID
+PaymentID paymentID
+String transactionID
void cancel()
}
class CancelDetail {
+String cancelDetailID
+String cancelID
}
class PaymentDetail {
+PaymentID paymentID
}
class Card {
CardID
pay()
cancel()
checkTransaction()
}
note for Card "checkTransaction() : ๊ฒฐ์ ๋ด์ญํ์ธ"
class Bank {
BankID
pay()
cancel()
checkTransaction()
}
note for Bank "checkTransaction() : ๊ฒฐ์ ๋ด์ญํ์ธ"
Payment "1" -- "*" PaymentDetail : ๊ฒฐ์ ์๋จ, ๊ธ์ก, ์ํ ์ ๋ณด
Cancel "1" -- "*" CancelDetail : ๊ฒฐ์ ์๋จ, ๊ธ์ก, ์ํ ์ ๋ณด
Cancel "0..1" --> "1" Payment : ์๊ฒฐ์ ์ ๋ณด
Payment --> PaymentMethod : ๊ฒฐ์ ์์ฒญ
Cancel --> PaymentMethod : ์ทจ์์์ฒญ
class PaymentTiemoutListner {
+beforeCancelForTimeout()
-checkLimitRetryCount()
-isPay()
+cancelForTimeout()
+postCancelForTimeout()
}
class timeoutResultNotification {
sendNotification()
}
PaymentTiemoutListner "1" -- "1" Payment : ์๊ฒฐ์ ํ์ธ
Payment --> PaymentTiemoutListner : Timeout Event
PaymentTiemoutListner --> PaymentMethod : cancel ์ฒ๋ฆฌ
- TO-BE ๊ตฌ์กฐ์์ ๋ณ๊ฒฝ๋๋ ERD๋ฅผ ์์ฑํ๋ค.
erDiagram
Payment {
Integer id
String name
}
Payment ||--|{ PaymentDetail : has
PaymentMethod {
Integer id
String name
}
PaymentDetail {
Integer id
Integer paymentId
Integer paymentMethodId
Long productId
Integer amount
Integer quantity
Integer unitPrice
String productInfo
}
PaymentDetail ||--|{ PaymentMethod : fundingsource
Cancel {
Integer id
Integer paymentId
String transactionId
}
Cancel ||--|{ CancelDetail : has
CancelDetail ||--|{ PaymentMethod : fundingsource
CancelDetail {
Integer id
Integer cancelId
Integer amount
String productInfo
}
PaymentDetail {
String paymentId
String paymentMethodId
}
CancelDetail {
String cancelId
}
payTimeoutRetry {
String id
Integer retryCnt
String status
}
payTimeoutRetryHistories {
String id
String status
}
payTimeoutRetry ||--o{ Retry-Process : do
payTimeoutRetryHistories ||--o{ Retry-Process : dohistories
- Timeout ๋ฐ์ ์ Event๋ฐ์ ์์ - SQS, SNS
- Timeout event subscription module ์์ฑ
- Timeout log table ์ค๊ณ, ์์ฑ
- Timeout ์ฌ์ฒ๋ฆฌ service ์ค๊ฐ, ๊ตฌํ
1. transaction ์ฑ๊ณต์ฌ๋ถ ํ์ธ
2. transaction ์ทจ์ ์ฒ๋ฆฌ ํ๊ธฐ (๊ฒฐ์ ์)
3. ์ฌ์ฒ๋ฆฌ logging(DB) : ์ฒ๋ฆฌ ํ์(3ํ), ์ฒ๋ฆฌ ๋ด์ญ - Timeout ์ฌ์ฒ๋ฆฌ ํํฉ ์กฐํ ์ด๋๋ฏผ page.
- Timeout ์ฌ์ฒ๋ฆฌ ์คํจ์ ๋ฉ์ผ ๋ฐ์ก ๋ชจ๋.
- ์๊ตฌ์ฌํญ ๋ถ์ : ์ด๋ฏธ์ํ
- ์ค๊ณ : 3d
- ์ผ์ ์ฐ์ : 1d
- Timeout ๋ฐ์ ์ Event๋ฐ์ ์์ - SQS, SNS : ์ด๋ฏธ ์ฌ์ฉํ๋ SQS๊ฐ ์๊ณ ํ์์ฑ ๋ฐ ๊ธฐ์กด์ฝ๋ ์์ : 2d
- Timeout event subscription module ์์ฑ : SQS, SNS : ์ด๋ฏธ ์ฌ์ฉํ๋ SQS๊ฐ ์๊ณ ์ ๊ท class ์์ฑ : 2d
- Timeout log table ์ค๊ณ, ์์ฑ : 1d
- Timeout ์ฌ์ฒ๋ฆฌ service ์ค๊ฐ, ๊ตฌํ : 2d
- transaction ์ฑ๊ณต์ฌ๋ถ ํ์ธ : 0.5d
- transaction ์ทจ์ ์ฒ๋ฆฌ ํ๊ธฐ (๊ฒฐ์ ์) : 0.5d
- ์ฌ์ฒ๋ฆฌ logging(DB) : ์ฒ๋ฆฌ ํ์(3ํ), ์ฒ๋ฆฌ ๋ด์ญ : 1d
- Timeout ์ฌ์ฒ๋ฆฌ ํํฉ ์กฐํ ์ด๋๋ฏผ page.: ๊ธฐ์กด admin์ ๋ฉ๋ด ์ถ๊ฐ : 5d
- Timeout ์ฌ์ฒ๋ฆฌ ์คํจ์ ๋ฉ์ผ ๋ฐ์ก ๋ชจ๋: ๊ธฐ์กด notification์ method ์ถ๊ฐ : 1d
gantt
dateFormat YYYY-MM-DD
title ๊ฒฐ์ ์ฌ์ฒ๋ฆฌ WBS
excludes weekends, 2023-12-25, 2024-01-01
%% (`excludes` accepts specific dates in YYYY-MM-DD format, days of the week ("sunday") or "weekends", but not the word "weekdays".)
section prepare
์๊ตฌ์ฌํญ๋ถ์ :done, des1, 2023-12-01, 10d
์ค๊ณ :active, des2, 2023-12-11, 3d
์ผ์ ์ฐ์ : des3, after des2, 1d
Timeout log table ์ค๊ณ, ์์ฑ : des4, 2023-12-27, 1d
section ๊ธฐ์กด ๋ชจ๋ ์์
Payment timeout event ๋ฐ์ :crit, b1, 2024-01-03,2d
Cancel timeout์ฉ cancel ์ถ๊ฐ :crit, b2, 2024-01-10, 2d
section ์ ๊ท ๋ชจ๋ ๊ตฌํ
Timeout event consumer ๋ชจ๋์์ฑ :c1, after b1, 2d
Queue ๋์ํ์ธ :milestone, after c1, 0d
Timeout service ๊ตฌํ :c2, after b2 , 2d
Timeout ์ฌ์ฒ๋ฆฌ ํํฉ ์กฐํ ์ด๋๋ฏผ ๊ฐ๋ฐ :c3, after c2 , 5d
Timeout ์ฌ์ฒ๋ฆฌ ์คํจ์ notification : c4, after c3, 1d
section ํ
์คํธ
Test & QA :after c4, 2d