Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
* SPDX-License-Identifier: MIT
-->

# TIMPANI
# timpani

Distributed real-time scheduling system with time-triggered execution capabilities. TIMPANI provides both C and Rust implementations of node executors and schedulers for deterministic real-time applications.
Distributed real-time scheduling system with time-triggered execution capabilities. timpani provides both C and Rust implementations of node executors and schedulers for deterministic real-time applications.

This repository contains both original C implementations and modern Rust ports with enhanced type safety and memory safety.

## Architecture

- **TIMPANI-N (Node Executor)**: Executes time-triggered tasks on individual nodes
- **TIMPANI-O (Node Scheduler)**: Orchestrates and schedules tasks across distributed nodes
- **timpani-n(Node Executor)**: Executes time-triggered tasks on individual nodes
- **timpani-o (Node Scheduler)**: Orchestrates and schedules tasks across distributed nodes
- **Sample Applications**: Real-time test applications for system validation

## Getting Started

### Clone the Repository

```bash
git clone --recurse-submodules https://github.com/MCO-PICCOLO/TIMPANI.git
cd TIMPANI
git clone --recurse-submodules https://github.com/eclipse-timpani/timpani.git
cd timpani
```

> **Note:** Use `--recurse-submodules` to automatically clone the required submodules (libbpf, etc.).
Expand All @@ -42,7 +42,7 @@ make
```
*For detailed setup and usage β†’ [Full Documentation](sample-apps/README.md)*

### [TIMPANI-N (Node Executor)](timpani-n/README.md)
### [timpani-n(Node Executor)](timpani-n/README.md)
C implementation of the time-triggered node executor component.

**Quick Build:**
Expand All @@ -58,7 +58,7 @@ make

*For detailed setup, dependencies, and usage β†’ [Full Documentation](timpani-n/README.md)*

### [TIMPANI-O (Node Scheduler)](timpani-o/README.md)
### [timpani-o (Node Scheduler)](timpani-o/README.md)
C implementation of the orchestrator component with gRPC & protobuf support for distributed scheduling.

**Quick Build:**
Expand All @@ -70,10 +70,10 @@ make
```
*For detailed setup, protobuf configuration, and usage β†’ [Full Documentation](timpani-o/README.md)*

### [TIMPANI Rust Components](timpani_rust/README.md)
Rust ports of TIMPANI components with enhanced type safety and memory safety.
### [timpani Rust Components](timpani_rust/README.md)
Rust ports of timpani components with enhanced type safety and memory safety.

#### [Rust TIMPANI-N (Node Executor)](timpani_rust/timpani-n/README.md)
#### [Rust timpani-n(Node Executor)](timpani_rust/timpani-n/README.md)
Rust implementation of the node executor with comprehensive CLI interface, configuration validation, and structured logging. **Status**: Configuration parsing complete, runtime features in development.

**Quick Build:**
Expand All @@ -84,7 +84,7 @@ cargo test # Run tests
```
*For detailed setup, usage examples, and current status β†’ [Full Documentation](timpani_rust/timpani-n/README.md)*

#### [Rust TIMPANI-O (Node Scheduler)](timpani_rust/timpani-o/)
#### [Rust timpani-o (Node Scheduler)](timpani_rust/timpani-o/)
Rust implementation of the global scheduler component. **Status**: In development.

**Quick Build:**
Expand All @@ -102,7 +102,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
## πŸ“– Documentation Structure

```
TIMPANI/
timpani/
β”œβ”€β”€ README.md # This file - main project overview
β”œβ”€β”€ sample-apps/
β”‚ β”œβ”€β”€ README.md # Sample applications documentation
Expand All @@ -124,4 +124,4 @@ TIMPANI/

---

**Navigation:** [Sample Apps](sample-apps/) | [TIMPANI-N (C)](timpani-n/) | [TIMPANI-O (C)](timpani-o/) | [Rust Components](timpani_rust/) | [Rust TIMPANI-N](timpani_rust/timpani-n/)
**Navigation:** [Sample Apps](sample-apps/) | [timpani-n(C)](timpani-n/) | [timpani-o (C)](timpani-o/) | [Rust Components](timpani_rust/) | [Rust timpani-n](timpani_rust/timpani-n/)
58 changes: 29 additions & 29 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
* SPDX-License-Identifier: MIT
-->

# TIMPANI Documentation Guide
# timpani Documentation Guide

**Last Updated:** May 12, 2026
**Project:** Eclipse TIMPANI (Rust Migration)
**Project:** Eclipse timpani (Rust Migration)
**Version:** Milestone 1 & 2 (gRPC Integration)

---

## πŸ“‘ Documentation Overview

This documentation provides a comprehensive guide to the TIMPANI project's migration from C/C++ to Rust, including architecture documentation, high-level design (HLD) comparisons, and implementation details. This structure is designed for **developers and contributors** to understand the system architecture and implementation.
This documentation provides a comprehensive guide to the timpani project's migration from C/C++ to Rust, including architecture documentation, low-level design (LLD) comparisons, and implementation details. This structure is designed for **developers and contributors** to understand the system architecture and implementation.

---

Expand All @@ -24,16 +24,16 @@ This documentation provides a comprehensive guide to the TIMPANI project's migra

System architecture, communication protocols, and high-level design documentation.

- [TIMPANI Architecture](architecture/timpani_architecture.md) - Overall system architecture
- [timpani Architecture](architecture/timpani_architecture.md) - Overall system architecture
- [gRPC Architecture](architecture/grpc_architecture.md) - Communication layer design

#### High-Level Design (HLD) Documents
πŸ“ [`architecture/HLD/`](architecture/HLD/)
#### Low-Level Design (LLD) Documents
πŸ“ [`architecture/LLD/`](architecture/LLD/)

Component-level HLD documents comparing legacy C/C++ with Rust implementations.
Component-level LLD documents comparing legacy C/C++ with Rust implementations.

**Timpani-O (Global Orchestrator):**
- [`HLD/timpani-o/`](architecture/HLD/timpani-o/) - 10 component HLD documents
**timpani-o (Global Orchestrator):**
- [`LLD/timpani-o/`](architecture/LLD/timpani-o/) - 10 component LLD documents
- 01: SchedInfo Service
- 02: Fault Service Client
- 03: D-Bus β†’ gRPC Node Service
Expand All @@ -44,10 +44,10 @@ Component-level HLD documents comparing legacy C/C++ with Rust implementations.
- 08: Data Structures
- 09: Communication Protocols
- 10: Error Handling
- [README](architecture/HLD/timpani-o/README.md) - Component overview & migration themes
- [README](architecture/LLD/timpani-o/README.md) - Component overview & migration themes

**Timpani-N (Node Executor):**
- [`HLD/timpani-n/`](architecture/HLD/timpani-n/) - 10 component HLD documents
**timpani-n (Node Executor):**
- [`LLD/timpani-n/`](architecture/LLD/timpani-n/) - 10 component LLD documents
- 01: Initialization & Main
- 02: Configuration Management βœ…
- 03: Time Trigger Core
Expand All @@ -58,7 +58,7 @@ Component-level HLD documents comparing legacy C/C++ with Rust implementations.
- 08: Communication (libtrpc β†’ gRPC)
- 09: Resource Management
- 10: Data Structures
- [README](architecture/HLD/timpani-n/README.md) - Component overview & migration status
- [README](architecture/LLD/timpani-n/README.md) - Component overview & migration status

**πŸ” Focus:** Understand system architecture and component-level AS-IS vs WILL-BE comparisons

Expand Down Expand Up @@ -91,7 +91,7 @@ Development standards, coding rules, and workflow guidelines.

---

## πŸ“Š Documentation Flow (Architecture β†’ HLD β†’ Implementation)
## πŸ“Š Documentation Flow (Architecture β†’ LLD β†’ Implementation)

```mermaid
graph TD
Expand All @@ -100,9 +100,9 @@ graph TD
A2[gRPC Architecture<br/>grpc_architecture.md]
end

subgraph "2. Component HLD"
H1[Timpani-O HLD<br/>10 Components]
H2[Timpani-N HLD<br/>10 Components]
subgraph "2. Component LLD"
H1[timpani-o LLD<br/>10 Components]
H2[timpani-n LLD<br/>10 Components]
H3[AS-IS vs WILL-BE<br/>Comparisons]
end

Expand Down Expand Up @@ -150,12 +150,12 @@ graph TD
eclipse_timpani/
β”œβ”€β”€ doc/ # πŸ“š All documentation (YOU ARE HERE)
β”‚ β”œβ”€β”€ README.md # This file
β”‚ β”œβ”€β”€ architecture/ # Architecture & HLD documentation
β”‚ β”œβ”€β”€ architecture/ # Architecture & LLD documentation
β”‚ β”‚ β”œβ”€β”€ timpani_architecture.md
β”‚ β”‚ β”œβ”€β”€ grpc_architecture.md
β”‚ β”‚ └── HLD/ # High-Level Design documents
β”‚ β”‚ β”œβ”€β”€ timpani-o/ # Timpani-O component HLDs
β”‚ β”‚ └── timpani-n/ # Timpani-N component HLDs
β”‚ β”‚ └── LLD/ # Low-Level Design documents
β”‚ β”‚ β”œβ”€β”€ timpani-o/ # timpani-o component LLDs
β”‚ β”‚ └── timpani-n/ # timpani-n component LLDs
β”‚ β”œβ”€β”€ docs/ # Implementation guides
β”‚ β”‚ β”œβ”€β”€ api.md
β”‚ β”‚ β”œβ”€β”€ getting-started.md
Expand All @@ -180,24 +180,24 @@ eclipse_timpani/

## πŸ” Development Checklist

### Phase 1: Architecture Review
### Step 1: Architecture Review
- [ ] System architecture documentation is complete and accurate
- [ ] gRPC architecture addresses all communication requirements
- [ ] Component boundaries are clearly defined

### Phase 2: Component HLD Review
### Step 2: Component LLD Review
- [ ] AS-IS architecture accurately reflects legacy implementation (C/C++)
- [ ] WILL-BE architecture documents Rust implementation status
- [ ] Component HLDs are verified against actual source code
- [ ] Component LLDs are verified against actual source code
- [ ] Migration notes capture key design decisions

### Phase 3: Implementation Verification
### Step 3: Implementation Verification
- [ ] API documentation matches protobuf definitions
- [ ] Build process is reproducible
- [ ] Test coverage meets acceptance criteria (>80% for critical paths)
- [ ] Performance benchmarks validate requirements

### Phase 4: Quality Assurance
### Step 4: Quality Assurance
- [ ] Code follows Rust coding standards (clippy, rustfmt)
- [ ] All PRs follow branching and review guidelines
- [ ] CI/CD pipeline enforces quality gates
Expand All @@ -214,12 +214,12 @@ eclipse_timpani/
- Consult [GitHub Issues](https://github.com/eclipse-timpani/timpani/issues)

### For Architecture Clarifications
- Refer to [TIMPANI Architecture](architecture/timpani_architecture.md)
- Refer to [timpani Architecture](architecture/timpani_architecture.md)
- Review [gRPC Architecture](architecture/grpc_architecture.md)
- Check component HLDs in [HLD/timpani-o/](architecture/HLD/timpani-o/) or [HLD/timpani-n/](architecture/HLD/timpani-n/)
- Check component LLDs in [LLD/timpani-o/](architecture/LLD/timpani-o/) or [LLD/timpani-n/](architecture/LLD/timpani-n/)

### For Development Queries
- Review architecture documentation: `architecture/` β†’ `HLD/` β†’ `docs/`
- Review architecture documentation: `architecture/` β†’ `LLD/` β†’ `docs/`
- Check test coverage reports: `timpani_rust/target/coverage/`
- Review CI/CD logs: GitHub Actions workflow results

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
* SPDX-License-Identifier: MIT
-->

# HLD: Initialization & Main Entry Point
# LLD: Initialization & Main Entry Point

**Component Type:** Application Entry Point
**Responsibility:** Program initialization, main execution loop coordination, graceful shutdown
**Component Type:** Application Entry Point
**Responsibility:** Program initialization, main execution loop coordination, graceful shutdown
**Status:** πŸ”„ Partially Migrated (C β†’ Rust)

---

## Component Overview

The Initialization & Main component serves as the entry point for Timpani-N, coordinating the startup sequence, initialization of all subsystems, runtime execution, and graceful shutdown.
The Initialization & Main component serves as the entry point for timpani-n, coordinating the startup sequence, initialization of all subsystems, runtime execution, and graceful shutdown.

---

Expand Down Expand Up @@ -86,7 +86,7 @@ static tt_error_t initialize(struct context *ctx)
return TT_ERROR_BPF;
}

// 5. Initialize TRPC and get schedule from Timpani-O
// 5. Initialize TRPC and get schedule from timpani-o
if (init_trpc(ctx) != TT_SUCCESS) {
return TT_ERROR_NETWORK;
}
Expand All @@ -113,7 +113,7 @@ static tt_error_t initialize(struct context *ctx)
```c
static tt_error_t run(struct context *ctx)
{
// 1. Synchronize with Timpani-O server
// 1. Synchronize with timpani-o server
if (sync_timer_with_server(ctx) != TT_SUCCESS) {
return TT_ERROR_NETWORK;
}
Expand Down Expand Up @@ -144,27 +144,27 @@ graph TD
A[main: Start] --> B[memset context]
B --> C[parse_config]
C --> D[initialize]

D --> E[setup_signal_handlers]
E --> F[set_affinity CPU]
F --> G[set_schedattr RT prio]
G --> H[calibrate_bpf_time_offset]
H --> I[init_trpc]
I --> J{Apex.OS mode?}

J -->|Yes| K[init_apex_list]
J -->|No| L[bpf_on]
L --> M[init_task_list]

K --> N[apex_monitor_init]
M --> N

N --> O[run]
O --> P[sync_timer_with_server]
P --> Q[start_timers]
Q --> R[start_hyperperiod_timer]
R --> S[epoll_loop]

S --> T[cleanup_context]
T --> U[exit]
```
Expand Down Expand Up @@ -208,7 +208,7 @@ async fn main() -> anyhow::Result<()> {

```rust
pub async fn run_app(config: Config) -> TimpaniResult<()> {
info!("Starting Timpani-N node executor");
info!("Starting timpani-n node executor");
info!("Configuration: {:?}", config);

// Initialize context
Expand All @@ -226,12 +226,12 @@ pub async fn run_app(config: Config) -> TimpaniResult<()> {

/// Initialize the context (⏸️ TBD - placeholders only)
pub fn initialize(ctx: &mut Context) -> TimpaniResult<()> {
info!("Initializing Timpani-N context...");
info!("Initializing timpani-n context...");
// TODO: Signal handlers
// TODO: CPU affinity
// TODO: RT priority
// TODO: BPF initialization
// TODO: Connect to Timpani-O
// TODO: Connect to timpani-o
// TODO: Fetch schedule
warn!("Initialization phase not fully implemented yet");
Ok(())
Expand Down Expand Up @@ -316,7 +316,7 @@ calibrate_bpf_time_offset();
### 5. TRPC Connection (C: βœ… | Rust: ⏸️)
```c
// C implementation
init_trpc(ctx); // Connect to Timpani-O via D-Bus
init_trpc(ctx); // Connect to timpani-o via D-Bus
```
- **Purpose:** Establish connection to orchestrator
- **Rust Status:** ⏸️ Planned (will use gRPC, not D-Bus)
Expand Down Expand Up @@ -393,7 +393,7 @@ Ok(())

---

**Document Version:** 1.0
**Last Updated:** May 12, 2026
**Status:** πŸ”„ Partial (CLI + Config βœ…, Runtime ⏸️)
**Document Version:** 1.0
**Last Updated:** May 12, 2026
**Status:** πŸ”„ Partial (CLI + Config βœ…, Runtime ⏸️)
**Verified Against:** `timpani-n/src/main.c`, `timpani_rust/timpani-n/src/main.rs`
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
* SPDX-License-Identifier: MIT
-->

# HLD: Configuration Management
# LLD: Configuration Management

**Component Type:** Configuration System
**Responsibility:** CLI parsing, configuration validation, defaults management
**Component Type:** Configuration System
**Responsibility:** CLI parsing, configuration validation, defaults management
**Status:** βœ… Complete in Rust

---

## Component Overview

Configuration Management handles command-line argument parsing, configuration validation, and default value management for all Timpani-N runtime parameters.
Configuration Management handles command-line argument parsing, configuration validation, and default value management for all timpani-n runtime parameters.

---

Expand Down Expand Up @@ -77,7 +77,7 @@ struct config {
#[derive(Debug, Clone, Parser)]
#[command(
name = "timpani-n",
about = "Timpani-N Node Executor - Time-Triggered Real-Time Task Scheduler",
about = "timpani-n Node Executor - Time-Triggered Real-Time Task Scheduler",
version
)]
pub struct Config {
Expand Down Expand Up @@ -180,6 +180,6 @@ impl Config {

---

**Document Version:** 1.0
**Status:** βœ… Complete
**Document Version:** 1.0
**Status:** βœ… Complete
**Verified Against:** `timpani_rust/timpani-n/src/config/mod.rs`
Loading
Loading