Skip to content

⚑ Real-Time Telemetry Engine in Rust β€” Built for πŸ›°οΈ edge devices, self-hosted metrics, and secure, offline-first ops. Powered by Axum, gRPC & PostgreSQL.

License

VinEckSie/rustpulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

85 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ RustPulse β€” Secure, Real-Time Telemetry Engine

CI CI License: MIT OR Apache-2.0 Rust Last Commit

A Rust-native system for local, secure, and high-performance telemetry monitoring β€” built with Hexagonal Architecture, DDD, and TDD.

⚠️ Notice
This repository is a personal development project and is currently incomplete and not intended for public reuse, redistribution, or demonstration.
Please do not fork, copy, or republish any part of this code.
The project is not in a stable state, and does not reflect a usable or launch-ready application.
Thank you for respecting the intent of this work.

πŸ“– Full Case Study

πŸ” Read the full technical case study here or browse the weekly changelog.

πŸ“‘ Overview

RustPulse is a modular, production-ready telemetry monitoring system written entirely in Rust. It is built for high-reliability environments such as simulation clusters, internal infrastructure, and latency-sensitive operations.

  • βœ… Hexagonal Architecture (Ports & Adapters)
  • βœ… Domain-Driven Design + Test-Driven Development
  • βœ… Fast REST/gRPC APIs with PostgreSQL persistence
  • βœ… CLI to Dashboard workflow with Prometheus/Grafana
  • βœ… Offline-first design for edge/mission-critical ops
  • βœ… Pluggable source architecture (trait-based)
  • βœ… Currently uses MockTelemetrySource for simulation
  • βœ… Real collectors can be added without touching core logic

🧱 Architecture Overview

  • Hexagonal Architecture

    • Modular structure separating core logic and external interfaces
  • Domain-Driven Design (DDD)

    • Node: agent identity and lifecycle
    • NodeTelemetry: real-time metrics from nodes
    • TelemetrySource: ingestion and validation layer
  • Test-Driven Development (TDD)

    • Integration-driven workflows for async flows & interfaces
  • Security & Auth

    • JWT for all API layers
    • Role-based access (planned)

βš™οΈ Tech Stack

Component Tooling Purpose
Backend Framework Axum (Rust) Fast and ergonomic async API building
Storage PostgreSQL + SQLx / JSONL Persistent or append-only telemetry logging
Transport Tonic (gRPC) Binary protocol for scalable services
CQRS Axum + Async Executors Clean separation of command/query
CLI Tool Clap + Rust Native CLI with full telemetry control
Auth JWT (jsonwebtoken) Secure session management
Observability Prometheus + Grafana Metrics & dashboards
Logging Tracing High-performance structured logs
CI/CD GitHub Actions + Clippy Linting, testing, quality gates

πŸ”§ Features

  • RESTful endpoints using axum
  • Modular config via .env with dotenvy
  • Centralized logging with tracing and tracing-subscriber
  • Integration & unit tests using reqwest + tokio
  • Architecture: Hexagonal Architecture for scalable and maintainable design.
  • Adapters: JSONL repository for efficient data persistence and querying.
  • Asynchronous: Thread-safe operations with tokio::sync::Mutex.
  • Error Handling: Simplified errors with anyhow crate.
  • Testing: Mock data and unit test integration for validation.

πŸ“ Project Structure

src/
β”œβ”€β”€ adapters/                 # Outbound adapters (DBs, mocks, sources)
β”‚   β”œβ”€β”€ mock_repo.rs
β”‚   β”œβ”€β”€ postgres_metrics_repo.rs
β”‚   └── telemetry_source_repo.rs
β”‚
β”œβ”€β”€ app/                      # Application services and orchestration
β”‚   β”œβ”€β”€ errors.rs
β”‚   └── metrics_service.rs
β”‚
β”œβ”€β”€ cli/                      # Command-line interface logic
β”‚   β”œβ”€β”€ args.rs
β”‚   └── commands.rs
β”‚
β”œβ”€β”€ core/                     # Domain logic: entities, ports, use cases
β”‚   β”œβ”€β”€ domains/
β”‚   β”‚   β”œβ”€β”€ node.rs
β”‚   β”‚   └── telemetry.rs
β”‚   β”œβ”€β”€ domains.rs            # Central re-exports (flat module style)
β”‚   └── port.rs               # Domain ports (interfaces for adapters)
β”‚
β”œβ”€β”€ handlers/                 # Inbound interfaces: HTTP handlers (Axum)
β”‚   β”œβ”€β”€ health.rs
β”‚   β”œβ”€β”€ metrics.rs
β”‚   └── root.rs
β”‚
β”œβ”€β”€ infra/                    # Infrastructure layer: DB, logging, startup
β”‚   β”œβ”€β”€ db.rs
β”‚   β”œβ”€β”€ logging.rs
β”‚   └── startup.rs
β”‚
β”œβ”€β”€ tests/                    # Integration tests
β”‚   β”œβ”€β”€ api.rs
β”‚   └── common.rs
β”‚
β”œβ”€β”€ lib.rs                    # Library entry point (used for tests or crates)
└── main.rs                   # Binary entry point

πŸš€ How to Run

🚧 Coming soon

πŸ“Έ Demo & Screenshots

🚧 Coming soon

🀝 Contributing

🚧 Project in early development. No contributions accepted yet. 🚧

πŸ“š Documentation

🚧 Processing

Hosted docs will be available on docs.rs after first crate release.

πŸ“„ License

MIT OR Apache-2.0


Thanks for checking out RustPulse! Follow the full case study for deep dives into architecture, design, and async telemetry in Rust.

About

⚑ Real-Time Telemetry Engine in Rust β€” Built for πŸ›°οΈ edge devices, self-hosted metrics, and secure, offline-first ops. Powered by Axum, gRPC & PostgreSQL.

Resources

License

Stars

Watchers

Forks