Skip to content

Latest commit

 

History

History
76 lines (64 loc) · 2.8 KB

README.md

File metadata and controls

76 lines (64 loc) · 2.8 KB

logo_elektrolade

Elektrolade - Charging Stations

Elektrolade is a distributed system designed to generate invoices for customers of electric charging stations. The system integrates a SpringBoot REST-API, RabbitMQ message queue, and a JavaFX UI. In the UI, the user can input a customer ID to generate an invoice, which is then downloaded as a PDF file to the local file system.

Services

  • Customer Database
    • Contains customer data (id, first name, last name)
    • URL: localhost:30001
  • Stations Database
    • Contains station data (id, db_url, latitude, longitude)
    • URL: localhost:30002
  • Individual Station Databases
    • Contains customer station data (id, kwh, customer_id)
    • URL Station 1: localhost:30011
    • URL Station 2: localhost:30012
    • URL Station 3: localhost:30013
  • Queue
    • URL: localhost:30003
    • Web: localhost:30083

Requirements

Start

Run this command directly from here:

docker-compose up

Use the predefined Run/Debug Configurations in your IDE. (Top right corner)
Start Services and API - Starts all services and the API
StationUI - To start the JavaFX UI

RabbitMQ-Dashboard

Documentations

Queue Names

  • RedQueue = start_queue
  • GreenQueue = stations_info_queue
  • PurpleQueue = job_notify_queue
  • BlueQueue = station_data_queue
  • YellowQueue = pdf_data_queue

General

  • JavaFX: Used to create the user interface (UI).
  • Java Spring Boot: Provides the REST-based API.
  • RabbitMQ: Manages the message queue for communication between components.

Workflow

  • User Interaction: The user inputs a customer ID into the JavaFX UI and clicks the "Generate Invoice" button.
  • API Request: The UI sends an HTTP request to the Spring Boot REST-based API to initiate the invoice generation process.
  • Data Gathering: Upon receiving the request, the application starts a new data gathering job for the specified customer.
  • Message Queue: The data gathering process is coordinated via RabbitMQ message queues.
  • PDF Generation: Once the data is gathered, it is sent to a PDF generator service. The PDF generator creates the invoice and saves it to the file system.
  • Polling for Completion: The UI periodically checks (polls) the file system to see if the invoice PDF has been generated and is available.

Diagrams

uml_elektrolade UML Diagram