Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Design Decisions

Metrum's design is based on the following principles:

  • Scalability: Metrum is designed to handle large amounts of sensor data from multiple devices.
  • Flexibility: Metrum provides a flexible framework for integrating with different sensors, devices, and systems.

Communication Flow

The following workflow diagram illustrates the process of publishing and subscribing to telemetry data using Metrum:

sequenceDiagram
    participant S as Sensor
    participant P as Publisher
    participant R as Reticulum Network
    participant Sub as Subscriber
    participant DB as InfluxDB
    
    Note over P,R: Publisher Initialization
    P->>P: Initialize with sensor interface
    P->>R: Announce presence (with SenML capability)
    
    Note over R,Sub: Subscriber Discovery
    R->>Sub: Forward publisher announce
    Sub->>Sub: Record publisher details
    
    Note over Sub,P: Connection Establishment
    Sub->>R: Request path to publisher
    R->>Sub: Path established
    Sub->>P: Establish link
    P->>Sub: Link acknowledged
    Sub->>P: Send subscription request
    P->>P: Activate subscriber
    
    loop At collection interval
        S->>P: Read sensor data
        P->>P: Format as SenML
        P->>P: Encode with CBOR
        P->>Sub: Send telemetry data
        Sub->>Sub: Decode CBOR
        Sub->>DB: Store SenML data
        
        alt InfluxDB unavailable
            Sub->>Sub: Queue data for retry
        end
    end
    
    loop At announce interval
        P->>R: Re-announce presence
    end