building-collatr

The core data model

Every metric in CollatrEdge is a name, a set of tags, a set of fields, and a timestamp.

That is the entire data model. One type. It flows through the whole system.

The channel is a ring buffer with drop-oldest overflow. When the system is under pressure, old data falls off the back. New data keeps flowing. The factory does not stop producing because your buffer is full.

The broadcaster gives each consumer its own independent channel. One slow output cannot block another. If your MQTT connection drops, your local store keeps writing. If your local store fills up, your dashboard keeps updating.

These are small decisions. They compound.

We wrote 55 tests for three data structures. That ratio might seem excessive. It is not. These structures carry every measurement from every machine. A subtle bug here corrupts everything downstream.

The boring foundations took a LOT of work. Personally, I’m glad they did.