TRIAGE/4 core scheduling package for priority-aware IoT message serving
Project description
TRIAGE/4
TRIAGE/4 (Tiered Resource Allocation for IoT Alarm and Geographic-priority Emergency) is a four-band message scheduler designed for distributed IoT emergency monitoring networks.
It resolves the classic priority inversion conflict between geographic zone priorities (e.g., routine telemetry from high-priority zones delaying critical emergency alarms from low-priority zones) while preventing channel monopolization by malicious or malfunctioning devices.
Key Features
- Semantic & Geographic Prioritization: Divides message traffic into 4 hierarchical bands:
- Band 0 (ALARM): Critical emergency alarms. Served with strict priority.
- Band 1 (HIGH): High-priority zone telemetry (token-constrained).
- Band 2 (STANDARD): Standard zone telemetry (token-constrained).
- Band 3 (BACKGROUND): Low-priority zone telemetry (token-constrained).
- Adaptive Alarm Protection: Uses rate monitoring and token buckets to detect and mitigate alarm floods (DoS attacks or sensor failures) by dropping excessive traffic in Band 0 while maintaining clean service for legitimate alarms.
- Per-Device Fair Queuing: Employs round-robin queueing inside bands to prevent a single high-frequency device from starving other sensors in the same band.
Installation
Install the core runtime package from PyPI:
pip install triage4
To run the research benchmarks or test suites locally, install with development dependencies:
pip install "triage4[dev,research]"
Quick Start
from triage4 import TRIAGE4Scheduler, TRIAGE4Config
# Configure the scheduler
config = TRIAGE4Config(
service_rate=20.0, # Mean service rate (messages/second)
high_zone_max=1, # Zone priority threshold for HIGH band (0-1)
standard_zone_max=3, # Zone priority threshold for STANDARD band (2-3)
high_token_budget=10, # Maximum tokens per refill window for HIGH band
enable_alarm_protection=True, # Protect against alarm storms
)
# Initialize the scheduler
scheduler = TRIAGE4Scheduler(config, scheduler_seed=42)
# Define a message workload
arrival_times = [0.0, 0.1, 0.15, 0.2]
device_ids = ["sensor_1", "sensor_2", "sensor_1", "sensor_3"]
zone_priorities = [0, 5, 0, 2] # Lower number = higher priority
is_alarm = [False, True, False, False]
# Execute discrete-event simulation
result = scheduler.schedule(
arrival_times=arrival_times,
device_ids=device_ids,
zone_priorities=zone_priorities,
is_alarm=is_alarm
)
# Inspect outcomes
print("Waiting times:", result.waiting_times)
print("E2E latency:", result.e2e_times)
print("Assigned bands:", result.priorities) # Mapped to Band 0, 1, 2, or 3
print("Alarms dropped:", result.metadata.get("alarm_dropped", 0))
Project Structure
src/triage4/: Contains the core scheduling logic and algorithms (packaged for distribution).assessment/: Contains baselines, scenarios, workloads, and performance benchmarking scripts (excluded from wheel packaging).tests/: Integration and unit tests.
Development and Testing
Run the test suite using pytest:
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file triage4-1.0.1.tar.gz.
File metadata
- Download URL: triage4-1.0.1.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf45befd8d0dd28b8e5e08c95b519edcfc7e3159c1e4aeb464a86ee8374531f0
|
|
| MD5 |
3f88a96ba35c061338fdaa17ecf6f20f
|
|
| BLAKE2b-256 |
3278e49a53ffe92ef23fdbb36fc28d5be40d42d6a408ab33ad15879e75a660b0
|
Provenance
The following attestation bundles were made for triage4-1.0.1.tar.gz:
Publisher:
publish.yml on les2feup/triage4
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
triage4-1.0.1.tar.gz -
Subject digest:
cf45befd8d0dd28b8e5e08c95b519edcfc7e3159c1e4aeb464a86ee8374531f0 - Sigstore transparency entry: 1640997920
- Sigstore integration time:
-
Permalink:
les2feup/triage4@1d20aaa598e748b76781d6deaf6159751e0226ae -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/les2feup
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1d20aaa598e748b76781d6deaf6159751e0226ae -
Trigger Event:
push
-
Statement type:
File details
Details for the file triage4-1.0.1-py3-none-any.whl.
File metadata
- Download URL: triage4-1.0.1-py3-none-any.whl
- Upload date:
- Size: 20.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d5c873188fa7613606f70123199a61754af89b43bb8f0526cca3b64364aebf4
|
|
| MD5 |
e3b25d0edb2325a631143b491fe73713
|
|
| BLAKE2b-256 |
12eabfe85290f80736845b5414e523f42e9b261f31d0e2453130388cd8efe2e6
|
Provenance
The following attestation bundles were made for triage4-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on les2feup/triage4
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
triage4-1.0.1-py3-none-any.whl -
Subject digest:
6d5c873188fa7613606f70123199a61754af89b43bb8f0526cca3b64364aebf4 - Sigstore transparency entry: 1640998085
- Sigstore integration time:
-
Permalink:
les2feup/triage4@1d20aaa598e748b76781d6deaf6159751e0226ae -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/les2feup
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1d20aaa598e748b76781d6deaf6159751e0226ae -
Trigger Event:
push
-
Statement type: