Architecture
SENSORS ROOM COMPUTER LOCAL SERVER SCREENS radar, oximeter, ──► one per room ──► message broker (MQTT) ──► nurse station thermometer, (Raspberry Pi): rules, baselines, alerts nurses' phones bed pad, mic, adapters per model, escalation and paging control room call bells sound -> scores journal (PostgreSQL)- Sensors never talk to the server directly. They publish small JSON messages to a message broker over MQTT, one contract for every kind of sensor. A new sensor model needs one adapter, written once.
- The room computer is a small computer per room (a Raspberry Pi in production). It reads the room’s sensors, analyses sound locally and sends only scores, never recordings. In the demo, a simulator plays every room computer.
- The server decides: which devices are approved, which resident a reading belongs to, whether a rule fires, and the life of every alert. Everything it decides is written to a journal and replayed when it starts, so it survives a crash or a restart.
- The screens get the whole ward when they connect and every change after that, live. A screen that loses the connection says so.
What runs where in the prototype
Section titled “What runs where in the prototype”| Part | Technology |
|---|---|
| Message broker | Mosquitto (MQTT), QoS 1 |
| Server | Kotlin and Ktor, one application |
| Journal | PostgreSQL, append-only |
| Nurse station and phone | Compose Multiplatform: the same code on the desktop and Android |
| Simulated ward, laptop microphone | Python |
Everything runs inside the building, on its own network. Nothing goes to the cloud.