forked from Yandex-Practicum/architecture-sprint-1
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
task Yandex-Practicum#2: add solution
- Loading branch information
Showing
4 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
@startuml | ||
actor "Клиент" as Client | ||
participant "Портал площадки" as Frontend | ||
participant "API Gateway" as Gateway | ||
participant "BFF для портала" as BFF | ||
participant "Сервис пользователей" as UserService | ||
participant "Севрис торговых площадок и товаров" as ProductService | ||
participant "Сервис заказов" as OrderService | ||
participant "Платёжный сервис" as PaymentService | ||
participant "Внешняя платёжная система" as ExternalPaymentSystem | ||
participant "Сервис уведомлений" as NotificationService | ||
participant "Шина событий" as EventBus | ||
participant "Vertica" as DWH | ||
|
||
Client -> Frontend: Open Portal | ||
Frontend -> Gateway: Authenticate Client | ||
Gateway -> UserService: Verify Credentials | ||
UserService -> Gateway: Authentication Response | ||
Gateway -> Frontend: Authentication Success | ||
|
||
Client -> Frontend: Search for Product | ||
Frontend -> Gateway: Request Product List | ||
Gateway -> BFF: Request Product List | ||
BFF -> ProductService: Fetch Products from Marketplaces | ||
ProductService -> BFF: Return Products | ||
BFF -> Gateway: Forward Product List | ||
Gateway -> Frontend: Display Products | ||
|
||
Client -> Frontend: Place Order | ||
Frontend -> Gateway: Create Order | ||
Gateway -> BFF: Create Order Request | ||
BFF -> OrderService: Validate Order & Create | ||
OrderService -> ProductService: Reserve Product | ||
ProductService -> OrderService: Product Reserved | ||
OrderService -> BFF: Order Created | ||
BFF -> Gateway: Order Confirmation | ||
Gateway -> Frontend: Show Order Confirmation | ||
|
||
Client -> Frontend: Proceed to Payment | ||
Frontend -> Gateway: Initiate Payment | ||
Gateway -> BFF: Payment Request | ||
BFF -> PaymentService: Process Payment | ||
|
||
PaymentService -> ExternalPaymentSystem: Execute Payment | ||
ExternalPaymentSystem -> PaymentService: Payment Confirmation | ||
|
||
PaymentService -> BFF: Payment Successful | ||
BFF -> Gateway: Payment Status | ||
Gateway -> Frontend: Show Payment Confirmation | ||
|
||
OrderService -> EventBus: Publish "Order Created" | ||
EventBus -> NotificationService: Order Created Event | ||
NotificationService -> Client: Notify "Order Created" | ||
|
||
PaymentService -> EventBus: Publish "Order Paid" | ||
EventBus -> NotificationService: Order Paid Event | ||
NotificationService -> Client: Notify "Order Paid" | ||
|
||
OrderService -> DWH: Log Order Data | ||
PaymentService -> DWH: Log Payment Data | ||
|
||
@enduml |
4 changes: 4 additions & 0 deletions
4
task2/telyshev_yp-architecture-sprint-1_arch_task2-Solution.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.