Product OS : Command Control
Product OS : Command and Control provides a set of tools for running command and control across a distributed set of Product OS : Servers.
What is Product OS?
Product OS is a collection of packages that provide different tools and features that can work together to build products more easily for the Rust ecosystem.
Feature Flags
| Feature | Default | Description |
|---|---|---|
std_base |
Yes | Standard library support. Pulls in core Product OS dependencies with their defaults. |
framework_axum |
Yes | Use Axum as the HTTP framework (forwarded to router and capabilities). |
framework_flow |
No | Use Flow as the HTTP framework (forwarded to router and capabilities). |
monitor |
Yes (via std_base) |
Enable the monitoring service via product-os-monitoring. |
tokio |
No | Enable the Tokio async executor via product-os-async-executor. |
distributed |
No | Enable distributed node discovery and communication (placeholder). |
relational_store |
No | Base relational store support from product-os-store. |
postgres_store |
No | PostgreSQL relational store (enables relational_store). |
sqlite_store |
No | SQLite relational store (enables relational_store). |
redis_key_value_store |
No | Redis key-value store. |
memory_key_value_store |
No | In-memory key-value store. |
file_key_value_store |
No | File-based key-value store. |
redis_queue_store |
No | Redis queue store. |
memory_queue_store |
No | In-memory queue store. |
The default feature set is ["std_base", "framework_axum"].
Installation
[]
= "0.0.1"
Pin the version to match the crate Cargo.toml when using path or git dependencies.
Documentation
Full API documentation is available at docs.rs/product-os-command-control.
Usage
Overview
Product OS : Command and Control provides a distributed command and control system for coordinating multiple Product OS server instances. It enables secure communication, service discovery, and workload distribution across a cluster of nodes.
Features
- Secure Communication: Authentication framework using Diffie-Hellman key exchange
- Service Discovery: Automatic node registration and discovery
- Load Balancing: Smart routing to available nodes based on capabilities
- Health Monitoring: Pulse checks and automatic failure detection
- Feature Management: Dynamic feature and service registration
- No-std Compatible Structure: Uses
no_std_compatfor structural no_std compatibility, though the crate currently requires an allocator and OS-level features (e.g., machine-uid, networking)
Installation
Add Product OS : Command and Control to your Cargo.toml:
[]
= { = "0.0.29" }
Quick Start
use ProductOSController;
use CommandControl;
use Certificates;
async
Architecture
The command and control system consists of several key components:
- ProductOSController: Main coordinator that manages nodes and services
- Registry: Tracks available nodes and their capabilities
- Node: Represents a single server instance in the cluster
- Commands: Structured way to send instructions to remote nodes
Security
All node-to-node communication is secured using:
- TLS/SSL certificates for transport security
- Diffie-Hellman key exchange for establishing shared secrets
- Message authentication using HMAC
Service Management
use ProductOSController;
use Arc;
async
Node Discovery
use ProductOSController;
async
Testing
# Run all tests
# Run with specific features
# Generate documentation
Contributing
Contributions are not currently available but will be available on a public repository soon.
License
This project is licensed under the GNU GPLv3.