Architecture - peholmst/VERA GitHub Wiki
Context
VERA is only used to dispatch resources to incidents and manage the information needed to do this efficiently. All other use cases are outside the scope of this project.

Actors
- Dispatchers receive emergency calls from the public, enter incidents and assignments into the system, dispatch and interact with resources on the field.
- Resources receive alerts when dispatched and report their location, state and staffing back to the system.
External Systems
- Command and Control is an unnamed external system to be developed later (maybe) that is used by officers to manage incidents and assignments. VERA pushes information about incidents, assignments and resources to this system.
- Incident Reporting is an unnamed external system to be developed later (maybe) that is used by officers to fill in incident reports, check response times, generate statistics, etc. VERA pushes information about incidents after they have been closed.
- SMTP Server is used by VERA to send alerts as e-mail. This form of alerting is used in a "for your information" manner and not meant to be used to actually alert resources. It can be enabled and disabled as needed.
- SMS Gateway is used by VERA to send alerts as text messages to phones. This is intended to be used as a backup mechanism in case the other alerting mechanisms fail. It can be enabled and disabled as needed.
Containers
VERA is built up from multiple containers, all of which can be replicated for high availability. Some containers can also be scaled out for increased performance, but not all. The containers communicate with each other asynchronously, passing messages to each other.

Runboard
- Runs on Raspberry PI with a Raylib UI, implemented in either C++, Go or Rust.
- Can interact with hardware peripherals through GPIO.
- Uses eSpeak if possible to read the alert details out loud in Finnish.
- Communicates with the Runboard API Gateway through a secured gRPC connection.
Mobile Terminal
- Runs on Android, implemented in Kotlin.
- Communicates with the Mobile Terminal API Gateway through a secured gRPC connection.
Dispatcher Workstation
- Runs on Windows, Linux and macOS with a JavaFX UI, implemented in Java.
- Includes a GIS database with maps and address information downloaded from NLS.
- Does not need to cover the entire country, only the areas that are served by the VERA instance.
- Consider: a separate GIS service used by all workstations in the same Emergency Dispatch Center.
- Communicates with the Dispatcher Workstation API Gateway through a secured gRPC connection.
Runboard API Gateway
- Runs on Linux, implemented in C++ or Go to be as fast as possible.
- Rust would be an option if it had better gRPC support.
- Runs inside a DMZ, with a secured gRPC endpoint accessible from the Internet.
- Forwards messages to and from the Message Broker.
- Can be replicated as many times as needed for both availability and scalability, using either server side or client side load balancing.
Mobile Terminal API Gateway
- Runs on Linux, implemented in C++ or Go to be as fast as possible.
- Rust would be an option if it had better gRPC support.
- Runs inside a DMZ, with a secured gRPC endpoint accessible from the Internet.
- Forwards messages to and from the Message Broker.
- Can be replicated as many times as needed for both availability and scalability, using either server side or client side load balancing.
Dispatcher Workstation API Gateway
- Runs on Linux, implemented in C++ or Go to be as fast as possible.
- Rust would be an option if it had better gRPC support.
- Runs inside a DMZ, with a secured gRPC endpoint accessible from the Internet.
- Forwards messages to and from the Message Broker.
- Can be replicated as many times as needed for both availability and scalability, using either server side or client side load balancing.
SMTP Gateway
- TODO
Message Broker
- A RabbitMQ instance or high-availability cluster, runs on Linux.
- Responsible for passing messages between all containers except the ones connecting from the Internet.
SMS Gateway
- TODO
VERA Database
- A PostgreSQL instance or high-availability cluster, runs on Linux.
- Stores all the data in the entire system.
VERA Server
- TODO