A passenger may request a taxi ride, sending their current location and their desired destination.
The system will pick one or more available taxi drivers (prefer drivers that are close to the passenger).
The taxi driver can accept or decline rides.
The system makes sure that only one taxi driver is assigned to pick up a passenger.
A taxi driver is in one of the following states:
Unavailable
Available
OfferedRide
OnRouteToPassenger
OnRouteToDestination
A taxi driver will at all times report its current location and state to the system.
Passengers will receive an invoice upon a completed ride, based on the distance and a rate (€/km).
The system will log all messages.
# Assignment
Decide on an architecture.
Architecture diagrams created in class are available in the SEW teams channel and may be used for reference.
You can still refine your architecture
Provide an updated system overview diagram in your upload.
RabbitMq_AnderTaxi 2024-12-10 08.08.02.excalidraw
⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠ You can decompress Drawing data with the command palette: ‘Decompress current Excalidraw file’. For more info check in plugin settings under ‘Saving’
finds taxis, that are nearby the passenger’s location
TaxiStateService
polling
delivers the current state of the taxi
TaxiManagementService
central service for managing taxi-requests, offers and assignments
guarantees: one taxi per passenger
InvoiceService
service, that handles the creation of invoices
Implement the messaging infrastructure in RabbitMQ
Create and configure all necessary exchanges and queues to ensure message delivery to the individual services in your system.
No upload needed, but students may be picked to showcase their configuration.
Login
guest
guest
# Code
RabbitMqService.cs
PublishRequest.cs
Program.cs
/
# Exchange & Queues
As you can see, the ride_service_exchange got created
Also our 4 queues got created.
# Sending Messages
Here we send an invoice.
The structure is based on the PublishRequest class
Sender:
Receiver:
/consume/invoice_service_queue
Here we get the price sent above.
Visualize your RabbitMQ infrastructure
Upload a diagram showing all the exchanges, queues and routing configurations in your RabbitMQ message broker.
# Topicexchange
From publisher to consumer.
ride_service_exchange
log_service_queue
passenger_service_queue
invoice_service_queue
driver_service_queue
RabbitMq_AnderTaxi 2025-01-04 21.54.34.excalidraw
⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠ You can decompress Drawing data with the command palette: ‘Decompress current Excalidraw file’. For more info check in plugin settings under ‘Saving’