결제 전환 목표 아키텍처 정의 (1/2) (1/2) (SPRING-ARC-REFERENCE-1783832425)
All checks were successful
ci / test (pull_request) Successful in 7s
All checks were successful
ci / test (pull_request) Successful in 7s
This commit is contained in:
parent
a2e3950178
commit
80ae77c686
1 changed files with 24 additions and 10 deletions
|
|
@ -1,14 +1,28 @@
|
||||||
# ADR: 결제 전환 경계 정의
|
# Context
|
||||||
|
|
||||||
## Context
|
The goal of this architectural decision is to define the boundaries for the payment processing component within our application. This includes how it interacts with other components and external systems, as well as the responsibilities it holds in the system overall.
|
||||||
현재 시스템은 외부 결제 게이트웨이와의 통합이 필요하며, 이를 위해 아키텍처적으로 명확한 경계를 설정해야 합니다. 결제 프로세스는 여러 단계로 나눠져 있으며, 각 단계는 성공적인 거래와 실패 시의 처리를 명확히 해야 합니다. 특히 '정상 흐름'과 커밋 및 롤백 경계는 다루어져야 합니다.
|
|
||||||
|
|
||||||
## Decision
|
# Decision
|
||||||
외부 결제 게이트웨이는 포트 인터페이스를 통해 접근하고, 도메인 계층에서는 직접적으로 어댑터를 참조하지 않아야 합니다. 이를 통해 결제 프로세스의 각 단계를 잘 구분하고, 예외 처리를 체계적으로 설계합니다.
|
|
||||||
|
|
||||||
## Alternatives
|
The payment processing component will be isolated as a microservice that communicates with other parts of the application through a well-defined API. It will handle all operations related to payment processing, including but not limited to:
|
||||||
1. **직접 어댑터 참조**: 도메인에서 외부 결제 게이트웨이에 직접 접근하는 방식. 이 방식은 구현이 간단하지만, 결제 시스템의 변경에 대한 유연성을 잃게 됩니다.
|
- Payment authorization
|
||||||
2. **에이전트 패턴 도입**: 에이전트를 통해 모든 결제 관련 요청을 처리하는 방식. 이는 복잡성을 추가하지만, 확장성과 유지보수에 유리합니다.
|
- Payment capture
|
||||||
|
- Payment refunds
|
||||||
|
|
||||||
## Consequences
|
This microservice will interact with external payment gateways and handle communication securely, ensuring compliance with payment standards and regulations.
|
||||||
현재 선택한 방식은 외부 결제 프로세스를 도메인 비즈니스 로직과 분리시켜, 나중에 API 변경이나 서비스 교체 시 시스템 전반에 미치는 영향을 최소화합니다. 그러나 처음 설계 시 추가적인 추상화와 경계 설정이 필요합니다.
|
|
||||||
|
# Alternatives
|
||||||
|
1. **Monolithic Payment Handling**
|
||||||
|
- Integrating payment processing directly into a monolithic application.
|
||||||
|
- ***Pros:*** Simplicity in deployment and potential performance gains.
|
||||||
|
- ***Cons:*** Difficult to maintain and scale, potential bottlenecks.
|
||||||
|
|
||||||
|
2. **Serverless Payment Functions**
|
||||||
|
- Using serverless functions to handle payment events.
|
||||||
|
- ***Pros:*** Scalability and reduced management overhead.
|
||||||
|
- ***Cons:*** Complexity in managing state and possibly higher latency.
|
||||||
|
|
||||||
|
# Consequences
|
||||||
|
- A clearly defined payment processing service allows for scalability and flexibility in handling various payment methods.
|
||||||
|
- The decision to isolate payments into a microservice compels adherence to the principles of microservices architecture, ensuring better maintainability and the ability to adopt alternative payment solutions in the future.
|
||||||
|
- Potentially increases initial complexity due to inter-service communication needs and requires thorough testing to ensure reliability.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue