Distributed Systems Semester Project

Fuel Station Data Collector

Implement a distributed system with a REST-based API, a RabbitMQ message queue and a JavaFX UI.

Scenario

You work in a company, that manages charging stations for electric cars. Every charging station keeps track of the customer that used the charger and the amount of kWh the customer used.

Your task is to build an application that generates an invoice PDF for a given customer.

Use JavaX to create the UI for the application.

Use Java Spring Boot to create the REST-based API.

Use RabbitMQ to manage the message queue.

The workflow is as follows:

  • You can input a customer id into the UI and click "Generate Invoice"
  • A HTTP Request calls the REST-based API
  • The application starts a new data gathering job
  • When the data is gathered, it gets send to the PDF generator
  • The PDF generator generates the invoice and saves it on the file svstem
  • The Ul checks everv couple seconds if the invoice is available

Setup

information.

You have a docker-compose project that sets up five databases and a queue. One database stores user information, one database stores the access information of the other three databases, which itself store the charging

We have a customer database, a station database and every charging station has its own database. The data is distributed! Read the READMEmd in the project.zip to get more information.

Specifications

There are five services that work on the message queue:

Spring Boot App

• Starts the process by sending a start message with the customer ID to the Data Collection Dispatcher

An example setup for a Distributed Systems project. It contains five databases (PostgreSQL) with example data and a messaging queue (RabbitMQ).

Data Collection Dispatcher

  • Starts the data gathering job
  • Has knowledge about the available stations
  • Sends a message for every charging station to the Station Data Collector
  • Sends a message to the Data Collection Receiver, that a new job started

Station Data Collector

  • Gathers data for a specific customer from a specific charging station
  • Sends data to the Data Collection Reciever

Data Collection Receiver

  • Receives all collected data
  • Sort the data to the according gathering job
  • Sends data to the PDF Generator when the data is complete

PDF Generator

  • Generates the invoice from data
  • Saves PDF to the file system

There are two API routes:

/invoices/<customer-id> [POST]

• Starts data gathering job

/invoices/<customer-id> [GET]

  • Returns invoice PDF with download link and creation time
  • Returns 404 Not Found, if it's not available

Teamwork and collaboration

Every teammember has to be assigned to one technical responsibility for one specific component (or components of an topic, i.e. GUI, REST-Server or decision in the project documentation.

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

docker-compose up

RabbitMQ-Dashboard

Documentations

相关推荐

最近更新

  1. TCP协议是安全的吗?

    2024-06-19 07:42:03       14 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-06-19 07:42:03       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-06-19 07:42:03       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-06-19 07:42:03       18 阅读

热门阅读

  1. 标题:高考后的抉择:专业优先还是学校优先?

    2024-06-19 07:42:03       8 阅读
  2. 关于vue elementUi校验slot插槽中的表单项

    2024-06-19 07:42:03       8 阅读
  3. 编程用什么电脑不卡的:深度解析与推荐

    2024-06-19 07:42:03       7 阅读
  4. 代码随想录算法训练营第十二天

    2024-06-19 07:42:03       6 阅读
  5. CSS选择器

    2024-06-19 07:42:03       9 阅读
  6. lspci总结

    2024-06-19 07:42:03       6 阅读
  7. 实现ROS中两个里程计数据的转换到同一坐标系下

    2024-06-19 07:42:03       9 阅读
  8. 基础语法总结 —— Python篇

    2024-06-19 07:42:03       5 阅读
  9. Lua迭代器详解(附加红点功能实例)

    2024-06-19 07:42:03       5 阅读