Crates.io | deterix |
lib.rs | deterix |
version | 0.1.5 |
source | src |
created_at | 2024-10-30 01:44:25.654347 |
updated_at | 2024-11-04 21:56:49.73978 |
description | Deterministic network emulator with microsecond timing precision |
homepage | https://github.com/AmyangXYZ/deterix |
repository | |
max_upload_size | |
id | 1427860 |
size | 776,492 |
Deterix is a lightweight network emulator written in Rust for building distributed applications that require precise timing control. It provides time-slotted communication with <1µs jitter on COTS hardware running Linux with PREEMPT_RT patch.
The network operates on a Time Division Multiple Access (TDMA) protocol with Node 0 serving as the network orchestrator. Key architectural features include:
|<------------------------ SLOTFRAME (8 slots) ------------------------>|
+--------+--------+--------+--------+--------+--------+--------+--------+
| Slot 0 | Slot 1 | Slot 2 | Slot 3 | Slot 4 | Slot 5 | Slot 6 | Slot 7 |
| IDLE | DEDIC | DEDIC | DEDIC | SHARED | SHARED | SHARED | SHARED |
| -/- | 1/2 | 2/3 | 3/1 | */0 | */0 | 0/* | */0 |
+--------+--------+--------+--------+--------+--------+--------+--------+
|<----------------------------- Single Slot ----------------------------->|
+-------+-----------------------------------+---------------------+-------+
| CLEAR | TX/RX | ACK | GUARD |
| 10% | 50% | 30% | 10% |
+-------+-----------------------------------+---------------------+-------+
Example transmission-slot chart showing two nodes join and synchronize with orchestrator and send 10 data packets in their dedicate slots.
Node 0 (Orchestrator)
Other Nodes
Initialization Phase
Join Process
New Node Node 0 (Orchestrator)
| |
|------ Join Request --------->| (in shared slot)
| | - Records node and add schedule
| | - Prepares timing info
|<----- Join Response ---------|
| |
|- Synchronize local clock |
|- Start normal operation |
Slot Assignment
Transmission Process
Core Components
Performance Features
Thread affinity optimization
RT scheduler prioritization
Efficient buffer management
Microsecond-precision timing
GPL-3.0