IronShadow is an industrial-grade Digital Twin engine designed for the "noisy" reality of manufacturing environments.
While traditional IoT platforms struggle with the "Thundering Herd" problem (thousands of devices reconnecting simultaneously after a network drop), IronShadow leverages Rust's zero-cost abstractions and the Actor Model to maintain a synchronized state (Device Shadow) with predictable latency.
In unstable networks (Factory Floors), you cannot rely on a direct request/response loop to the device. IronShadow implements a 3-state synchronization machine:
- Reported State: What the device says it is doing (e.g., "Temp: 80°C").
- Desired State: What the application wants the device to do (e.g., "Set Temp: 75°C").
- Delta: The difference calculated by the engine, triggering commands only when necessary.
Each connected device is represented by a lightweight Actor (~2KB RAM). This allows IronShadow to hold the state of 1 million devices in memory on a single commodity server, processing state changes asynchronously without thread contention.
Uses an internal specific MQTT broker implementation (based on rumqttd) that applies backpressure to the TCP stream. If the database (TimescaleDB) slows down, the ingestion layer slows down the network read rate, preventing Out-Of-Memory (OOM) crashes.
- Hot State: Redis (for instant Shadow retrieval).
- Cold History: TimescaleDB (PostgreSQL) for time-series analytics and predictive maintenance training data.
- Language: Rust (Async)
- Messaging: MQTT v5
- State Management: Redis
- Time-Series DB: TimescaleDB
- Protocols: WebSockets (for real-time dashboarding)
# Run the load generator (simulating 50k sensors)
cargo run --release --bin swarm -- --devices 50000 --frequency 100ms
# Output:
# Ingestion Rate: 500,000 msg/sec
# CPU Usage: 15% (16 Cores)
# Memory Usage: 1.2 GB