Below is an example of a deployment diagram for our event-based reservation system. This shows how components of the system are deployed across servers, environments, and external services in a physical setup. You can use the following Mermaid code to visualize it in a Mermaid-enabled renderer:
graph TD
%% Deployment Nodes
subgraph ClientMachine [Client Machine]
FrontendApp[Reservation Frontend App]
end
subgraph AppServer [Application Server]
ReservationService[Reservation Service]
WolverineEventBus[Wolverine Event Bus]
DurableOutbox[Durable Outbox]
end
subgraph Messaging [Messaging Infrastructure]
MessageBroker[Message Broker]
end
subgraph DatabaseServer [Database Server]
ReservationsDB[Reservations Database]
CustomersDB[Customers Database]
end
subgraph ExternalServices [External Systems]
PaymentGateway[Payment Gateway]
NotificationService[Notification Service]
ResourceCatalog[Resource Catalog Service]
end
%% Interactions
FrontendApp --> ReservationService
ReservationService --> WolverineEventBus
WolverineEventBus --> DurableOutbox
WolverineEventBus --> MessageBroker
MessageBroker --> PaymentGateway
MessageBroker --> NotificationService
ReservationService --> ReservationsDB
ReservationService --> CustomersDB
ReservationService --> ResourceCatalog
Explanation
Nodes:
- Client Machine: Where the user interacts with the frontend application (e.g., a web browser or mobile app).
- Application Server: Hosts the core logic, including the Reservation Service, Wolverine Event Bus for asynchronous messaging, and the Durable Outbox for reliability.
- Database Server: Stores persistent data for reservations and customers in respective databases.
- External Systems: Third-party services, such as the Payment Gateway (for payment processing), Notification Service (for sending confirmations), and Resource Catalog (for checking resource availability).
Connections:
- The Frontend App communicates with the Reservation Service deployed on the Application Server.
- The Reservation Service publishes events to the Wolverine Event Bus, which handles messaging and communicates with external services like the Payment Gateway and Notification Service.
- The service also interacts with the Database Server to manage persistent data.
- The Resource Catalog Service provides resource availability information to the Reservation Service.
Scalability and Flexibility:
- The components are deployed on separate servers (or containers), making the system more scalable and fault-tolerant. For example, the Application Server and Database Server can be scaled independently based on the load.