{"id":20670648,"url":"https://github.com/amyangxyz/deterix","last_synced_at":"2026-01-28T18:01:48.022Z","repository":{"id":260641688,"uuid":"880577565","full_name":"AmyangXYZ/deterix","owner":"AmyangXYZ","description":"Deterministic network emulator with microsecond timing precision written in Rust","archived":false,"fork":false,"pushed_at":"2024-11-09T15:14:47.000Z","size":459,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-03T19:07:37.569Z","etag":null,"topics":["deterministic","network","real-time","rust","tdma"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AmyangXYZ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-30T01:03:27.000Z","updated_at":"2025-07-20T16:52:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"8ec8748b-7c61-4bb4-98c2-59d9ce87c18d","html_url":"https://github.com/AmyangXYZ/deterix","commit_stats":null,"previous_names":["amyangxyz/deterix"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AmyangXYZ/deterix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmyangXYZ%2Fdeterix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmyangXYZ%2Fdeterix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmyangXYZ%2Fdeterix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmyangXYZ%2Fdeterix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AmyangXYZ","download_url":"https://codeload.github.com/AmyangXYZ/deterix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmyangXYZ%2Fdeterix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28848340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deterministic","network","real-time","rust","tdma"],"created_at":"2024-11-16T20:22:20.200Z","updated_at":"2026-01-28T18:01:48.006Z","avatar_url":"https://github.com/AmyangXYZ.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deterix: Deterministic Network Emulator with Microsecond Timing Precision\r\n\r\nDeterix is a lightweight communication framework designed specifically for modular digital twins requiring deterministic data exchange. Built on PREEMPT_RT Linux, it achieves microsecond-precision timing on commodity hardware through pure software implementation, enabling reliable real-time communication between digital twin components without requiring specialized hardware. The framework leverages standard Commercial Off-The-Shelf (COTS) computers and regular network infrastructure, making it an accessible solution for distributed digital twin deployments.\r\n\r\n## Features\r\n\r\n- Time-slotted communication (TDMA)\r\n- Guaranteed message delivery windows\r\n- Microsecond timing precision of [slot ticker](https://github.com/AmyangXYZ/rt_ticker)\r\n- No GC interruptions\r\n- Zero-copy packet handling\r\n- Distributed architecture\r\n- Runs on any modern COTS hardware\r\n\r\n## Network Architecture\r\n\r\n### Overview\r\n\r\nThe network operates on a Time Division Multiple Access (TDMA) protocol with Node 0 serving as the network orchestrator. Key architectural features include:\r\n\r\n- Distributed time synchronization with \u003c1µs precision\r\n- Deterministic slot-based communication\r\n- Dynamic network formation and management\r\n\r\n### Slot Structure\r\n\r\n```\r\n|\u003c------------------------ SLOTFRAME (8 slots) ------------------------\u003e|\r\n+--------+--------+--------+--------+--------+--------+--------+--------+\r\n| Slot 0 | Slot 1 | Slot 2 | Slot 3 | Slot 4 | Slot 5 | Slot 6 | Slot 7 |\r\n| IDLE   | DEDIC  | DEDIC  | DEDIC  | SHARED | SHARED | SHARED | SHARED |\r\n| -/-    | 1/2    | 2/3    | 3/1    | */0    | */0    | 0/*    | */0    |\r\n+--------+--------+--------+--------+--------+--------+--------+--------+\r\n\r\n\r\n|\u003c----------------------------- Single Slot -----------------------------\u003e|\r\n+-------+-----------------------------------+---------------------+-------+\r\n| CLEAR |               TX/RX               |         ACK         | GUARD |\r\n|  10%  |                50%                |         30%         |  10%  |\r\n+-------+-----------------------------------+---------------------+-------+\r\n```\r\n\r\nExample transmission-slot chart showing two nodes join and synchronize with orchestrator and send 10 data packets in their dedicate slots.\r\n\r\n![](./slot_chart/chart_1.png)\r\n\r\n### Time Synchronization\r\n\r\n- **Node 0 (Orchestrator)**\r\n\r\n  - Provides network-wide time reference using system clock\r\n  - Manages slot timing and synchronization\r\n  - Broadcasts periodic sync messages\r\n\r\n- **Other Nodes**\r\n  - Maintain synchronized local clocks\r\n  - Update timing based on sync messages\r\n  - Calculate slot boundaries locally\r\n\r\n## Network Operations\r\n\r\n### Network Formation\r\n\r\n1. **Initialization Phase**\r\n\r\n   - Node 0 starts as orchestrator\r\n   - Dedicated join slots are reserved in each slotframe\r\n   - New nodes begin in unsynchronized state\r\n\r\n2. **Join Process**\r\n   ```\r\n   New Node                  Node 0 (Orchestrator)\r\n      |                              |\r\n      |------ Join Request ---------\u003e| (in shared slot)\r\n      |                              | - Records node and add schedule\r\n      |                              | - Prepares timing info\r\n      |\u003c----- Join Response ---------|\r\n      |                              |\r\n      |- Synchronize local clock     |\r\n      |- Start normal operation      |\r\n   ```\r\n\r\n### Communication Protocol\r\n\r\n1. **Slot Assignment**\r\n\r\n   - Deterministic sender/receiver pairs per slot\r\n   - Scheduled transmission windows\r\n   - Guard bands prevent overlap\r\n\r\n2. **Transmission Process**\r\n   - Reliable delivery with ACK mechanism\r\n   - Automatic retransmission\r\n   - Sequence number tracking\r\n\r\n### Implementation Details\r\n\r\n- **Core Components**\r\n\r\n  - TX/RX Queue Management\r\n  - Slot Ticker System\r\n  - Zero-copy Packet Pool\r\n  - RT Thread Scheduling\r\n\r\n- **Performance Features**\r\n  - Thread affinity optimization\r\n  - RT scheduler prioritization\r\n  - Efficient buffer management\r\n  - Microsecond-precision timing\r\n\r\n## LICENSE\r\n\r\nGPL-3.0\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famyangxyz%2Fdeterix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famyangxyz%2Fdeterix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famyangxyz%2Fdeterix/lists"}