# launch **Repository Path**: rippleos/launch ## Basic Information - **Project Name**: launch - **Description**: MOSS 进程启动管理 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-11 - **Last Updated**: 2026-05-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MOSS Launch System (mlaunch) JSON-based launch system for managing and orchestrating multiple MOSS nodes with DAG scheduling and fault recovery. ## Features - **JSON Configuration**: Declare nodes, dependencies, and launch order - **DAG Scheduling**: Directed acyclic graph for dependency management - **Process Management**: Start, stop, restart nodes - **Health Monitoring**: Heartbeat-based failure detection - **Fault Recovery**: Automatic restart on failure with configurable retry limits - **Priority Support**: Configure process nice values ## Architecture ``` launch/ ├── include/launch/ │ └── mlaunch.h # Main API ├── src/ │ ├── config.cpp # Configuration loading │ ├── launch_file.cpp # Launch file parsing │ ├── process.cpp # Process management │ ├── process_agent.cpp # Node agent │ ├── dag_scheduler.cpp # DAG scheduling │ ├── lifecycle.cpp # Node lifecycle │ ├── node_launcher.cpp # Node launcher │ └── main.cpp # Entry point ├── test/ # Unit tests └── examples/ # Example launch files ``` ## Dependencies - mshm (Shared Memory) - mlog (Logging) - msafety (Safety features) - mcom (Communication) ## Building ```bash cd mlaunch mkdir -p build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DMLAUNCH_BUILD_TESTS=ON make -j4 ``` ## Running Tests ```bash ctest ``` ## Usage ### Launch File Format (JSON) ```json { "launch": { "name": "my_system", "nodes": [ { "name": "sensor_node", "executable": "/path/to/sensor_node", "args": ["--config", "sensor.yaml"], "env": { "SENSOR_TYPE": "lidar" }, "priority": "high", "depends_on": [] }, { "name": "processing_node", "executable": "/path/to/processing", "depends_on": ["sensor_node"], "health_check": { "enabled": true, "type": "heartbeat", "interval_ms": 1000, "timeout_ms": 5000, "restart_on_failure": true, "max_restarts": 3 } } ] } } ``` ### CLI Usage ```bash # Launch all nodes from file mlaunch launch system.json # Launch specific node mlaunch start sensor_node # Stop specific node mlaunch stop sensor_node # Restart node mlaunch restart sensor_node # List all nodes and status mlaunch status ``` ## Key Concepts ### DAG Scheduler The launch system builds a DAG from node dependencies and schedules nodes in topological order. ### Health Check Types - **heartbeat**: Node sends periodic heartbeats via shared memory - **process**: Monitor process existence ### Process Priority - `low` - Nice value +10 - `medium` - Nice value 0 - `high` - Nice value -10 ## Example Launch File See `examples/` directory for complete examples. ## License MIT License