Skip to content
rafal-nowak edited this page Feb 8, 2023 · 4 revisions

Architecture Decision Records

Use MQTT as communication protocol

Context and Problem Statement

What communication protocol to use?

Decision Drivers

  • Open Data Protocol
  • Lightweight
  • Commonly used
  • Reliable

Considered Options

  • MQTT
  • HTTP
  • CoAP

Decision Outcome

Chosen option: "MQTT", because it is lightweight, so it can work in very low bandwidth networks, MQTT allows communication between nodes in both reliable and unreliable networks.

Use Eclipse Mosquitto as MQTT broker

Context and Problem Statement

What MQTT broker to use?

Decision Drivers

  • Open Source
  • Commonly used
  • Large Community
  • Customization options
  • Available as a Docker container

Considered Options

  • Mosquitto MQTT Broker
  • HiveMQ-CE

Decision Outcome

Chosen option: "Eclipse Mosquitto", because it is a lightweight, open-source, and easy to use MQTT broker. The biggest problem with HiveMQ-CE is that it doesn't seem to offer many customization options. While you can change the port that it runs on via the docker command, you can't change the default username and password, and you can't enable encryption. There also doesn't appear to be any sort of bridging options. It's a very basic broker that is easy to get running, but it doesn't seem to offer much in the way of customization.

Use mongoDB as database

Context and Problem Statement

What database to use?

Decision Drivers

  • Open Source
  • Commonly used
  • Large Community
  • Available as a Docker container
  • Fast queries

Considered Options

  • mongoDB
  • PostgreSQL

Decision Outcome

Chosen option: "mongoDB", because it is faster and more scalable. Queries in NoSQL databases can be faster than SQL databases.

Use Amazon SQS as message queue

Context and Problem Statement

What message queue to use?

Decision Drivers

  • Available on AWS
  • Commonly used
  • Large Community
  • Available as a Docker container

Considered Options

  • Amazon SQS
  • Kafka
  • RabbitMQ

Decision Outcome

Chosen option: "Amazon SQS", because it is ease of setup and to use. It is sufficient for this project.