/

Ambitwin · source-available, not open source · © 2026 Nicolò Ghignatti

Alerting

Keywords on this page
WordMeaningExample
AlertThe message sent for one Breach“Lab 2 is too hot”
Alert TypeA kind of alertTemperature
Alert ChoiceWhat one person wants, in one organizationSam, Northfield: temperature yes, air no
DeviceOne place a person can be reachedSam’s phone
RecipientA person who gets this alertSam
BreachThe time a room spends outside a limitLab 2, from 14:05 to 14:20
Opt inChoosing to receive somethingSam opted in to temperature alerts

Question: who must be told, and where? Kind: Supporting. Needs: Identity & Access, Building Management, Telemetry Ingestion.

This domain never decides that something is wrong. Ingestion did that already. It only gets the news to the right people.


In the real world

Lab 2 is too hot. Sam should hear about it, on the phone, even when not following the building.

Two different questions hide here:

They change separately. A new phone must not reset Sam’s choices.


The model

classDiagram
    class Device {
        person
    }
    class AlertChoice {
        person
        organization
        types
    }
    class Alert {
        breach
        type
    }
    Alert "1" ..> "many" Device : sent to

Device and Alert Choice are two separate things on purpose. Each one can be replaced without touching the other.


Who gets it

Each step narrows the list. Numbers are made up.

flowchart TD
    A["Breach Started in Lab 2"] --> B["Science Hall belongs to northfield-university"]
    B --> C["All 40 members of the organization"]
    C --> D["12 chose temperature alerts"]
    D --> E["9 have at least one device"]
    E --> F["14 devices get the alert"]

The first step is the one question this domain asks: “which organizations own this building?”. Ownership is a Building Management fact.


Worked example

PersonMember?Chose temperature?DevicesGets it?
SamNorthfieldYesPhone, tabletYes, on both
AdaNorthfieldNoPhoneNo
LiaNorthfieldYesNoneNo, nowhere to send it
MaxAcmeYesPhoneNo, wrong organization

Lia can see the problem by following the building. Alerts add to that, they do not replace it.


Rules

  1. One Breach, one Alert. Readings during the same breach send nothing new.
  2. Only members of the building’s organizations, and only those who opted in.
  3. A person has one Alert Choice per organization. Choices do not leak across.
  4. An Alert goes to all of a person’s devices.
  5. Removing a device keeps the choices and the other devices.

Edge case: shared building. Science Hall belongs to two organizations, and Sam is in both. Sam gets one alert, not two. It is one breach.

Edge case: back to normal. The room recovers before anyone reacts. Nothing extra is sent. No “ignore that” message.


Open questions