Compare commits
6 commits
main
...
forge/SPRI
| Author | SHA1 | Date | |
|---|---|---|---|
| 921987b2a9 | |||
| ea58481729 | |||
| 47c09a3441 | |||
| 7d4bcb0a76 | |||
| b07b206ac1 | |||
| d756f01a4e |
6 changed files with 61 additions and 44 deletions
3
.forge/SPRING-ARC-REF-FINAL-1783833422-attempt-2.md
Normal file
3
.forge/SPRING-ARC-REF-FINAL-1783833422-attempt-2.md
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
# SPRING-ARC-REF-FINAL-1783833422-attempt-2
|
||||||
|
|
||||||
|
Forge 이슈 작업 브랜치 `forge/SPRING-ARC-REF-FINAL-1783833422-attempt-2`.
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# iss-5a912ed79baf-attempt-3
|
|
||||||
|
|
||||||
Forge 이슈 작업 브랜치 `forge/iss-5a912ed79baf-attempt-3`.
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# iss-87190c9836ac-attempt-1
|
|
||||||
|
|
||||||
Forge 이슈 작업 브랜치 `forge/iss-87190c9836ac-attempt-1`.
|
|
||||||
14
docs/architecture/adr-payment-boundary.md
Normal file
14
docs/architecture/adr-payment-boundary.md
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
# ADR for Payment Boundary
|
||||||
|
|
||||||
|
## Context
|
||||||
|
The payment processing system is pivotal for the business operations, therefore a well-defined boundary is necessary to manage dependencies, isolate services, and ensure the resilience of the application.
|
||||||
|
|
||||||
|
## Decision
|
||||||
|
We will implement a microservices architecture for payment processing, with the following boundaries: 1. Payment Service, 2. Notification Service, 3. Reporting Service. These services will communicate through well-defined APIs and will be independently deployable.
|
||||||
|
|
||||||
|
## Alternatives
|
||||||
|
1. Monolithic architecture - rejected due to tight coupling and scalability issues.
|
||||||
|
2. Service-oriented architecture - rejected due to complexity in service integrations compared to microservices.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
This decision allows for better scalability and maintainability of the payment processing system but will introduce challenges in inter-service communication and data consistency management.
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
# Package Responsibility Map
|
| 패키지 | 책임 | 금지 의존성 |
|
||||||
|
|--------------|-------------------------------|---------------------|
|
||||||
| Package | Responsibility | Forbidden Dependencies |
|
| controller | 사용자 요청 처리 | service, repository |
|
||||||
|----------------|------------------------------------------------|------------------------|
|
| service | 비즈니스 로직 처리 | controller |
|
||||||
| controller | Handles user input and orchestrates payment | domain |
|
| repository | 데이터 접근 및 관리 | service |
|
||||||
| service | Contains business logic for payment processing | integration |
|
| domain | 도메인 모델 및 규칙 정의 | integration |
|
||||||
| repository | Data access layer for payment records | service |
|
| integration | 외부 시스템과의 통신 처리 | domain |
|
||||||
| domain | Defines the core domain models and business rules| controller |
|
|
||||||
| integration | Communicates with external payment gateways | domain, service |
|
|
||||||
|
|
@ -1,38 +1,46 @@
|
||||||
```mermaid
|
```mermaid
|
||||||
sequenceDiagram
|
sequenceDiagram
|
||||||
participant User
|
participant User
|
||||||
participant PaymentService
|
participant Controller
|
||||||
participant PaymentGateway
|
participant Service
|
||||||
|
participant Repository
|
||||||
participant Database
|
participant Database
|
||||||
|
|
||||||
%% Normal Flow
|
User->>Controller: 결제 요청
|
||||||
User->>PaymentService: Initiate Payment
|
Controller->>Service: 결제 처리 요청
|
||||||
PaymentService->>Database: Store Transaction
|
Service->>Repository: 결제 정보 저장
|
||||||
Database-->>PaymentService: Transaction Stored
|
Repository->>Database: DB에 저장
|
||||||
PaymentService->>PaymentGateway: Process Payment
|
Database-->>Repository: 저장 완료
|
||||||
PaymentGateway-->>PaymentService: Payment Success
|
Repository-->>Service: 저장 완료
|
||||||
PaymentService->>Database: Update Transaction Status
|
Service-->>Controller: 처리 완료
|
||||||
Database-->>PaymentService: Transaction Updated
|
Controller-->>User: 결제 완료
|
||||||
PaymentService-->>User: Payment Success
|
|
||||||
|
|
||||||
%% External Failure Flow
|
%% 외부 실패 흐름
|
||||||
User->>PaymentService: Initiate Payment
|
User->>Controller: 결제 요청
|
||||||
PaymentService->>Database: Store Transaction
|
Controller->>Service: 결제 처리 요청
|
||||||
Database-->>PaymentService: Transaction Stored
|
Service->>Repository: 결제 정보 저장
|
||||||
PaymentService->>PaymentGateway: Process Payment
|
Repository->>Database: DB에 저장
|
||||||
PaymentGateway-->>PaymentService: Payment Failure
|
Database-->>Repository: 저장 실패
|
||||||
PaymentService->>Database: Rollback Transaction
|
Repository-->>Service: 저장 실패
|
||||||
Database-->>PaymentService: Transaction Rolled Back
|
Service-->>Controller: 처리 실패
|
||||||
PaymentService-->>User: Payment Failure
|
Controller-->>User: 결제 실패
|
||||||
|
|
||||||
%% DB Failure Flow
|
%% DB 실패 흐름
|
||||||
User->>PaymentService: Initiate Payment
|
User->>Controller: 결제 요청
|
||||||
PaymentService->>Database: Store Transaction
|
Controller->>Service: 결제 처리 요청
|
||||||
Database-->>PaymentService: Transaction Store Failure
|
Service->>Repository: 결제 정보 저장
|
||||||
PaymentService-->>User: Payment Failure
|
Repository->>Database: DB에 저장
|
||||||
|
Database-->>Repository: DB 오류
|
||||||
|
Repository-->>Service: DB 오류
|
||||||
|
Service-->>Controller: 처리 실패
|
||||||
|
Controller-->>User: 결제 실패
|
||||||
|
|
||||||
%% Commit & Rollback
|
%% Commit/Rollback 경계
|
||||||
Note over User, PaymentService:
|
alt 정상 흐름
|
||||||
commit --> PaymentService
|
Service->>Database: Commit
|
||||||
rollback --> PaymentService
|
else 외부 실패
|
||||||
|
Service->>Database: Rollback
|
||||||
|
else DB 실패
|
||||||
|
Service->>Database: Rollback
|
||||||
|
end
|
||||||
```
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue